Back

批量更新wordpress图片链接

|

把图片全都转到amazon s3上面去了 ,然而一张一张的更新链接不太实际,用sql语句就会很简单:
`UPDATE wp_posts SET post_content = replace( post_content, 'xxx.com/wp-content/uploads/', 'bucket_name.s3.amazonaws.com/wp-content/uploads/' ) ;`
在s3里面使用wp的目录结构是为了配合[amazon s3 for wordpress](http://tantannoodles.com/toolkit/wordpress-s3/),这个插件可以自动把图片上传到云中。
霍巴特天气回暖,渐成花的海洋。香气扑鼻,就是鸟叫声不怎么动听。

No comments yet

Leave a comment

About me

I live in Tasmania, an island a little far from the rest of the world and very close to the sea.
Father of two little girls, have two puppies.

Work

Work in IT industry, AI is my working partner.