Bulk delete pending wordpress comments

PUBLISHED ON Tue 22, 2011 | POSTED IN Quick Press

Been under a comment spam attack lately? Or you just did not have time to delete spam comments over several months and you now have hundreds of spam comments that needs be deleted page by page using the wordpress admin? Don’t fret, there are a couple of easy ways to bulk delete pending comments in your wordpress blog.

Method 1: Direct MySQL Query



If you know yourself around phpMyAdmin and MySQL queries, just run this one line query in the “Sql Query” window of your WordPress database in phpMyAdmin. This query instantaneously deletes all comments in “pending” status. All your approved comments won’t be touched. To be on the safer side you may also want to backup your entire database or just wp_comments table just in case something goes wrong.

DELETE FROM wp_comments WHERE comment_approved = 0

Method 2: Using a wordpress plugin

If you don’t want to mess with your database directly, use a plugin like Delete Pending Comments . I tried this in a blog which had around 600 pending comments. Took about 4 minutes to delete all pending comments and it did the job well. There are also few other plugins similar to this plugin out there in the WordPress Plugin Directory.

 

Add a comment