If you are an active WordPress admin for multiple sites, then I’m sure you are very accustomed to having 100’s or 1000’s of SPAM comments being sent to your blog. This post will show you exactly how to mass delete pending comment SPAM from your WordPress website in one fell swoop.
There are many instances where you need to delete all of the pending comments at once. WordPress makes this extremely difficult to do. It is also extremely hard on the server when it starts to get into 5000+ pending comments and may crash your system.
Here is the safest, most effective way to delete pending comments from your WordPress site. Note/Disclaimer – any time you use PHPmyadmin you run the risk of causing harm to your website. Always back up your data before making any changes or following the steps in this post.
Step 1. Back up your entire website. Do this by backing up your .sql database and home directory in cpanel or whatever admin panel your host is using.
Step 2. Identify the WordPress site with the pending comments.
Step 3. Activate phpMyAdmin by clicking on the icon in cpanel.
Step 4. Locate the database with the pending comments and click the SQL tab on top. Once you’ve done that, input the following command:
SELECT *FROM wp_comments WHERE comment_approved ="0"
Step 5. You will now see the amount of rows selected which should be equal to the number of pending comments you have.
Step 6. Click on the “show query box” and input this command to delete the selected rows (comments):
delete from wp_comments WHERE comment_approved ="0"
Step 7. If everything went well, you should see a screen that looks something like this:
Feels good, right?
If you want to make sure your database is ok, then make sure you repair and optimize your database using the optimize command in phpMyAdmin, which is a few extra steps.
If you don’t want to go this route there are plugins that will do this for you, or you could just delete them manually using the WordPress back end but depending on the number of comments this could take a very long time.
For your convenience, we’ve recorded a video walk through that will take you through the same steps shown above:
Hello I'm Patrick Coombe and I'm the CEO and Founder of Elite Strategies, an agency I started in 2009. One of the main reasons I love blogging about SEO is the research it takes to come up with the posts. It allows me to not only write about what I love, but to learn more about the industry in the process. I hope you enjoyed this post, if you did consider sharing it or even better linking to it!
If you are a Wordpress user, you will be very familiar with the internal system that saves revisions of your posts during the drafting process: This has come in very handy....never. It's never come in handy, ever. I'm sure one day it will save the day and I will regret…
Recently we've run into a few situations where a WordPress theme has gotten in the way of our SEO efforts. Some of these situations have been subtle, others were more...noticeable. Your theme and plugin both try to inject meta / title tags This is something you need to pay particular…
Today we'd like to tell the story of a website from an awesome company that we've only been working with a short while. Like many websites, this one used WordPress as a CMS but unfortunately used a theme that was poorly developed and in as we say at Elite Strategies:…