每次登录朋友的一个WordPress站点,都会看到N多待审核的垃圾评论,如果要通过WP后台删除,那简直就是一件非常头疼的事情。其实我们可以通过 Delete All Pending Comments 插件或者SQL命令来批量删除。
在后台搜索安装 Delete All Pending Comments 插件以后,就可以在左边的评论菜单下看到一个 Pending Comments,进去后勾选复选框,然后点击 delete 按钮就可以删除所有待审核的评论了:

如果你不喜欢折腾插件,并且你可以访问 PhpMyAdmin ,那你可以通过 SQL 命令来删除:
delete from wp_comments where comment_approved = '参数' |
delete from wp_comments where comment_approved = '参数'
wp_comments是WP默认的评论表,请根据自己的实际,修改前面的 wp_ 为你的数据库表前缀。
“参数”有3个选项:
- spam: 垃圾评论
- 0: 未审核评论
- 1: 已审核评论
如果要删除待审核评论,参数那里就修改为 0 即可。
相关推荐:
phpMyAdmin教程 之 使用SQL查询语句修改数据库信息
WordPress 常用数据库SQL查询语句大全
来源:
https://www.wpdaxue.com/delete-pending-spam-comments.html
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(): Failed to enable crypto in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_33145.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57