最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to Bulk find and replace MySQL for post image url

programmeradmin2浏览0评论

after the website migration, I find there are some image URL for some posts are misplaced. suppose the image URL for the article should be in /2021/07/, however it became /2020/07, and the image dead 404. I have to replace the image URL manually from the Gutenberg editor.

If I want to do it with SQL Command, how should I do it in a safe way? is it correct to find all wp-content/uploads/2021/07/, replace as wp-content/uploads/2021/07/ from the wp_postmeta table?

Thanks

after the website migration, I find there are some image URL for some posts are misplaced. suppose the image URL for the article should be in /2021/07/, however it became /2020/07, and the image dead 404. I have to replace the image URL manually from the Gutenberg editor. https://ibb.co/bggdX7V

If I want to do it with SQL Command, how should I do it in a safe way? is it correct to find all wp-content/uploads/2021/07/, replace as wp-content/uploads/2021/07/ from the wp_postmeta table?

Thanks

Share Improve this question asked Jan 4, 2022 at 3:13 Blue LiBlue Li 154 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

You can use this tool for the bulk updates. but make sure to back up the database before using this tool. link to git is here

发布评论

评论列表(0)

  1. 暂无评论