wordpress的一些常用SQL

WP批量修改/替换文章内容

UPDATE wp_posts SET post_content = replace(post_content, ‘tongchenkeji.com’,’tongchenyun.com’);

WP批量修改/替换文章摘要

UPDATE wp_posts SET post_excerpt = replace(post_excerpt, ‘tongchenkeji.com’,’tongchenyun.com’);

 

WP批量修改/替换文章作者

UPDATE wp_posts SET post_author = 原作者id WHERE post_author = 新作者id;

 

WP批量修改/替换评论中的敏感词

UPDATE wp_comments SET comment_content = REPLACE( comment_content,’tongchenkeji.com’,’www.tongchenyun.com’);

批量删除某人评论

 

根据昵称删除:

DELETE FROM wp_comments WHERE comment_author =’昵称’;

根据URL链接删除

DELETE FROM wp_comments WHERE comment_author_url LIKE ‘%www.tongchenyun.com%’;

根据留言者的Email删除

DELETE FROM wp_comments WHERE comment_author_email =’admin@tongchenyun.com’;

    没有参与者,您可以成为第一个参与者!
欢迎您,新朋友,感谢参与互动!欢迎您 {{author}},您在本站有{{commentsCount}}条评论
{{commentStrCount.cCount}}/{{commentStrCount.count}}