Mass Delete Spam Comments in Moderation

A question that pops up from time to time in the forums is how do I mass delete spam comments? A particular user had neglected his blog for a few months only to return and find thousands of spam comments awaiting moderation. Of course deleting this stuff through the WordPress interface could take hours or even days if you have a lot of spam.

Login to phpMyAdmin and run this query ...

DELETE from wp_comments WHERE comment_approved = '0';

Be sure to backup your database first.

As a preventative measure you should also use an anti-spam plugin. On this blog I use both Akismet and Bad Behaviour. Since using these plugins my own spam counts have dropped from hundreds a day to less than a half dozen a month.

About the author
Len has been blogging for over 10 years and is a rabid WordPress fan. In addition to blogging here you can find him writing the occasional article and toiling away in the forums at WeblogToolsCollection.com. He also hangs out at the WordPress support forums lending a hand where he can. You can also find him at his other blog LenKutchma.com

Leave a Reply

CommentLuv Enabled