Down and Dirty Un-spam WordPress Comments
One thing I’ve learned in running my own blog is that spam-bots really, really like open forms. I’m sure experienced bloggers will smile (and say “that’s all?”) when I say that I get probably no less than 5 spam comments per day. With WordPress, it’s simple to be rid of spam — just click the comment’s “spam” link in the moderation section. Unfortunately, with so many spam and so few real comments, the spam link becomes second nature to click. And today I accidentally spammed a legit comment. Oops.
There doesn’t seem to be much info on Google regarding un-spamming comments, so I thought I’d look into the database to see what I could do. Comments are held in the MySQL table “[wp-prefix]comments” (the default is “wp_comments”). One of the columns in that table is “comment_approved”. Unmoderated comments have a 0 in this column. Approved comments have a 1. And marked-as-spam comments have “spam”. To un-spam a comment, use your MySQL client (be it phpMyAdmin or the MySQL command line program) to edit the comment_approved field back to 0 (or 1) in the appropriate comment’s row. Unfortunately, “delete” really means “delete” — a deleted comment is removed from the database altogether, so you’ll have to scrounge legit comments back together from the emails that WP sends.
I really don’t see why the WP devs didn’t build an un-spam function into the WP admin. It seems like an obvious addition, given the structure of the database.
Subscribe via Email Alerts
Subscribe in an RSS reader
What is RSS?
Eternicode on Twitter
I run a wordpress blog too. I have just started to spam and erase comments. I get so much more garbage than a real post. But thats what you get when you run a blog. But wordpress is probably the best blog out there.
Andrew, I know how you feel about the “flood” of spam. Hitting the comment moderation section really does feel more like taking out the garbage than reading others’ opinions.
I found a “simple captcha” plugin for wordpress that stopped my comment spam dead in its tracks — I can’t remember seeing a single piece of true, bot-generated spam since installing it.
You can find the plugin at http://blog.zorex.info/?page_id=2
I know WP comes with akismet pre-installed, but from what I’ve read about it, it has a LOT of extra features I don’t feel I need, and that in itself makes the plugin feel bloated. I like the simple feel of the simple captcha — it does one thing, and does it well.
I will try your advice. I am really flooded by spam comments on my wordpress blogs within my sites.