批量删除wordpress待审核评论

由于垃圾太多,我也懒得从5000条评论中去找了,因为博客中断了好久,所以可以顾不上这些,直接删。一条条删显然不科学,于是用到了下面的sql语句。

1
delete from wp_comments where comment_approved = '0'

这里的“0”代表评论状态为“待审核”。

批量删除垃圾评论,适用于WP站内垃圾评论过多,手动删除太慢。

1
delete from wp_comments where comment_approved = 'spam'

批量删除某人的评论,根据ID来判断。

1
delete from wp_comments where comment_author_id = 'ID'

Leave a Reply

You must be logged in to post a comment.

RSS feed for comments on this post. TrackBack URL