Mark asked: How to batch deleting spam comments on a WordPress blog?

October 9, 2008 at 5:10 pm

Mark just asked me how can he delete more than 6000 spam comments he received on his blog during his holidays.

First of it all, backup your WordPress database. Then, login to your phpmyadmin, select your WordPress blog database and click on SQL:
Batch deleting spam comments on a WordPress blog

Then, insert the following sql command:

DELETE from wp_comments WHERE comment_approved = '0'; 

All non-approved comments we be deleted. But instead of having such trouble next time, you should definitely install Akismet!