Solving A Blog’s
Spam Comment Flood!
Some blogs just get pummeled with spam even when they take the best of precautions…
Or maybe they forgot to take precautions or their spam control plugins accidentally got deactivated!
Either way, a mass of comments in the SPAM area of your comments section can be a pain in the rump!
And it can cause you hosting resource issues if you try to delete thousands of spam comments manually.
Before we go any further though though, we MUST back up the database! Never make significant changes to your site (and particularly your database) without a backup.
(If your cPanel is still a new and scary place, I suggest you check out our cPanel training course to help you not only remove the mystery but learn how to do several very important tasks for your WordPress-based website.
You can use your preferred method or simply follow along in the video below and creating the backup (export) while following along.
If you’ve got a couple thousand spammy comments on your blog that are either unapproved or already in the spam category (thanks to Akismet), then this video and the text below will show you how to get rid of them without getting a nastigram from your host for exhausting system resources.
Steps For Deleting Spam From Your WordPress Database:
1. Log Into Your cPanel
2. Go to phpMyAdmin and select the appropriate WP Database (you may need to check your sites wp-config.php file for the database name)
3. Export the site as a backup (or make a database backup in your favorite method)
4. Click on the wp_comments table name to select it and then click the SQL tab along the top of phpMyAdmin
5. Use the appropriate SQL query below to mass delete spam comments in WordPress:
If the spam comments are all in pending (this will delete ALL pending comments), the command to use in the Run SQL box is:
If you’re using a spam plugin such as Akismet that has moved the spammy comments into the “spam” section of your comments area, and you have rescued any legitimate comments, then the command to use in the Run SQL box is:
If you notice that the wp_commentsmeta table is drastically inflated (much larger than comments) you may also wish to wipe the meta data from those old spam comments away. First go back to your table list and then click on the wp_commentsmeta table name.
Then the command to use in the Run SQL box is:
Once you have done this, you may also choose to follow the steps outlined in the video to adjust “overhead” and also to “optimize” the database.
Once you’re done, you’ll be blessed with a delightfully EMPTY spam folder!
~ Kim ~
Simple Tech Tips For Marketing
PS: Want my team to do this for you? Contact us and we’ll open you a support invoice and get it done for you!