How to easily delete All approved and Un-approved WordPress blog Comments

How to easily delete All approved and Un-approved WordPress blog Comments

Recently I happened to encounter a WordPress blog which has more than 10000 spam comments and most of them are approved automatically,so my task is to delete all comments at once(including genuine comments),but if you do this via WordPress GUI it would take hours to do the job so here is a easiest method to delete all comments at once using Phpmyadmin.

wordpress-logoCommand to Delete all Pending Comments In WordPress

delete from wp_comments WHERE comment_approved ="0";

To delete all approved comments

delete from wp_comments WHERE comment_approved ="1";

Instead you can use this command to delete all the comments

delete from wp_comments;

You can execute these commands via Terminal also.but please have a Database BACKUP before you do this.I recommend to use free spam protection service called Akismet to avoid spam’s in future.

About author

No Comments

forum No comments yet

You can be first to leave a comment

Write a comment