Mark just asked me how can he delete more than 6000 spam comments he received on his blog during his holidays.
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:

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!
21 Responses
Thanks a lot Jean, it worked like a charm!
Glad it helped!
Oh thank god, I had one of my websites hacked via a plugin, forgot to reinstall Akismet, and was trying to figure out how to delete 32k spam comments. You’re a lifesaver!
great, there’s bunch of comment in my blog
WordPress 2.7 now has cool native “Delete all spam” button.
Worked perfect!
I’m using a different template, so I think that is why this cannot be done.. i came up with the following:
Deleted rows: 0 (Query took 0.0003 sec)
Hmmm.. why?
I using a review type of theme.
Any other methods?
Got it solved.. My bad..
Choose the wrong database with nil comments.. sql is not that bad after all, NOT SO SCARY as i thought. Easy peasy..
http://www.drostdesigns.com/how-to-mass-delete-comments-from-wordpress-using-phpmyadmin/#comment-333095
MORE COMPLETE INFO….
Generally I do not post on blogs, but I would like to say that this post really forced me to do so, Excellent post!
I don’t know If I said it already but …Hey good stuff…keep up the good work!
I read a lot of blogs on a daily basis and for the most part, people lack substance but, I just wanted to make a quick comment to say I’m glad I found your blog. Thanks,)
A definite great read….
Fantastic! Thanks!
Trackbacks: