If you read my rejuvenating your blog post I wrote a couple days ago then you know how much spam can be sitting in the pending status of your comment section after taking a hiatus from a blog.

These spam comments can reach into the thousands and its time consuming to go through them all and delete by hand.

So today I am going to show you one quick simple method to delete all the comments currently in your pending section of wordpress comments!

Before I did this my database was upwards of 100mb which is very hard to keep track of if I ever need to move servers or anything like that. A large % of that mb was because of all these spam comments I had waiting in the moderation que.

Its vital for me to get rid of these so my database will work quicker, backup easier and overall be more efficient!

Step by step how to do it!

1. Open up your cpanel.

2. Open up MYSQL section.

3. Open PHPMyAdmin

3. Find your database and back it up. Here is a video tutorial on how to backup your database through PHPMYADMIN.  I will assume you can figure it out by following this tutorial but if you can’t just comment below or email me for further help and directions.

Video Tutorial – Backing Up Your Database

4. Now that your database is backed up, return to the main PHPMyAdmin page and open up your database.

5. From here select the wp_comments table.

6. Once in the table click the SQL button at the top of the screen.

7. You will be presented with a box and a “Go” button in the bottom right. Inside this box enter the code below that is green. Make sure to enter it into your SQL box exactly as shown so nothing gets messed up.

DELETE FROM wp_comments WHERE comment_approved = 0

8. Make sure to enter it exactly as its shown above, this will select and delete all the pending comments in your que. Simply click the “Go” button to make it happen, after you do it will return results saying xxx number of comments deleted. (SUCCESS).

All you have left to do now is log into your wp-admin panel and see how clean and pretty it looks! My suggestion is to install some GOOD comment blocking plugins so you won’t have this problem again!

If you found this useful return the favor by commenting below and by joining my newsletter like tons of others. Enjoy your spam free day!

Filed under: Personal Posts

Like this post? Subscribe to my RSS feed and get loads more!