利用SQL语句进行数据替换

利用SQL批量修改WordPress中的文章内容为新的内容。理论适用于所有数据库内容替换。

UPDATE wp_posts SET post_content = replace(post_content, '旧内容', '新内容') WHERE `post_content` LIKE '%旧内容%';
UPDATE wp_posts SET post_content = replace(post_content, '旧内容', '新内容') WHERE `post_content` LIKE '%旧内容%';
UPDATE wp_posts SET post_content = replace(post_content, '旧内容', '新内容') WHERE `post_content` LIKE '%旧内容%';
© 版权声明
THE END
喜欢就支持一下吧
点赞14 分享
Smash the waves would rather get in the way of the reef hill, also not willing to take a step back.
海浪宁可在挡路的礁山上撞得粉碎,也不肯后退一步