Spam, Ham: What do you do with over 1000 of them in your comments queue?

After New Year, I came back to a huge glut of spam in my database! I hadn’t configured a standard plugin because I thought the blog would go relatively unnoticed! Boy! Was I wrong or what? The queue contained over 1000 spams, that didn’t include spam in my comment plugin either.

spam I am

So how do you deal with a huge queue of spam like that? I spent ages clicking page after page when I realized that I was doing it the stupid way.

Stage 1: Filter the spam properly

  • Step 1: Install Akismet in your plugins. You can either download it from the website or search within your plugins “Add New” option and add it or upload it.
  • Step 3: Activate Akismet, then go to the Akismet Configuration Page under Plugins submenu. In the space, enter your API Key and check automatically discard.

Stage 2: Check for spam in the Pending Queue

check for spam

Step 4: Once Akismet is activated, head to the comments page, where you will see a button clearly marked “Check for Spam”. Hit it. If the Spam queue is long, it may take a while to get through the queue or your server may time out. Just refresh the comments page. If necessary repeat.

Step 5: Get the plugin called Clear Spam in which “…adds an option to clear spam messages from the WordPress database” under the Comments section right next to the “Check for Spam” button. On my server it caused a couple of Server 500 errors but it did work after a refresh.

delete spam

But after cleaning the spam out, all gone!

all gone

Stage 3: Prevention is better than cure

Stage 6: Akismet works very well on filtering comments out so that your queue is empty, but it does very little to prevent spam. And it does remove spam after 30 days or so automatically, so you really shouldn’t see any. But…

Stage 7: Install Lester Chan’s wonderful plugin called IP Ban which in his words helps you to “Ban users by IP, IP Range, host name, user agent and referer url from visiting your WordPress’s blog. It will display a custom ban message when the banned IP, IP range, host name, user agent or referer url tries to visit you blog. You can also exclude certain IPs from being banned.” One word of warning: do not enter your own IP Address in the Banned IP address box. You will have a lot of trouble to restore your own access!

ip ban options

Stage 8: Enter the IP addresses that you are being spammed from. This is the option that I mostly use because I find that these addresses generate the most vicious and most frequent comment spams. You can use my list, but you will also be able to buttress it with your own list of IP addresses, too.


Drop me a note with some other common IPs so I can ban them, too!

Note the use of wildcards (in this case, an asterisk) to deter users from any of these IP addresses. Be careful: you may ban too many users if you use too many asterisks! If you don’t know what you are doing, just stick with Akismet until you understand more about the Internet!

The proof is in the pudding.

In the time that it has taken me to write this posting for EeeBlogger, you will see that IP Ban has already prevented at least four comment spams. Yes, it tracks stats, too! Take a look.

banned stats

A final note: You may feel tempted, esp. to read through the comments to make sure there aren’t real comments being misidentified. Do not be tempted to click on any of the links in the spam to find out what it takes you to. I had a harrowing experience a few months ago when I did that out of curiosity. Don’t. Don’t. Don’t. Seriously. Don’t even think about. If you do, you will be taken through numerous redirects, stuff will be loaded on your PC, your anti-virus will be disabled, and your PC will be compromised. So don’t.

What’s your experience with Spam? What plugins do you use? Drop me a line…