The Web Hosting Blog for Smart Webmasters

Webhosting, website management and other topics of interest for webmasters

How to Delete WordPress Comments Awaiting Moderation

Add Your Comment
Over time, the number of WordPress comments in your database can grow at an alarming rate. On a popular blog, you could find yourself with thousands of comments sitting in the ‘Awaiting Moderation’ queue.

Unfortunately, WordPress provides no simple way of cleaning up comments. There’s a mass edit tool, but it’s not particularly versatile.

In order to deal with your comments, you’ll need to dive into the database. You must take a full database backup before proceeding.

Delete WordPress Comments Awaiting Moderation

Using phpMyAdmin (or the database tool provided in your hosting control panel), select your WordPress database.

In phpMyAdmin, click the SQL tab, and paste the following query in the box:

SELECT * FROM wp_comments WHERE comment_approved ="0"

This command selects all comments in the wp_comments table that have not been approved for publication. Review the results.

Next, enter this query:

DELETE from wp_comments WHERE comment_approved ="0"

This command permanently deletes all comments in the wp_comments table that have not been approved for publication.

Finally, in phpMyAdmin, run a Check and Repair on your WordPress database.

Image credit: premasagar.

Keep up with posts like this by subscribing to our RSS feed, or following @WhoIsHosting on Twitter.

How to Delete WordPress Comments Awaiting Moderation by
If you enjoyed this post, subscribe to updates

We'll email you when we post more articles like this

If you enjoyed this post, subscribe to updates

We'll email you when we post more articles like this

Twitter Facebook

Discussion

Get Adobe Flash player