How to Mass Delete Spam Comments on WordPress
For many wordpress users, there are so many comment spam everyday, if he does not use some plugins to due with them( such as Akismet, etc). He must be very angry about these spams.
If you want to delete or manage these comment spam, refer to:
If you want to delete these comment spam quickly, just follow this:
1. Log in MySQL by PHPMyadmin or another MySQL manager.
2. Locate the database of your wordpress, and click the table wp_comments. If you have another prefix, please change it.
3. Excute this syntax, you can choose one for your requirements:
DELETE * FROM wp_comments WHERE comment_approved = 'spam'; DELETE * FROM wp_comments WHERE comment_approved = '0';
Note: the first syntax will delete all the comment spam quickly, the next will delete all the waiting-approved comments.
4. Okay, Finished, refresh your comments manager windows in Wordpress panel, you will find all the spams disappeared.
Using SSH prompt
If you are using telnet or ssh tools, such as putty. you can accomplish this mass opertaion on the prompt.
1. Log in your website server
2. Log in your mysql in the prompt
mysql -u root -p USE wordpress; DELETE * FROM wp_comments WHERE comment_approved = 'spam'; DELETE * FROM wp_comments WHERE comment_approved = '0'; QUIT;