.: ShaolinTiger - Kung-Fu Geekery :.

Combating Spam - Disable Trackbacks for Older Posts in Wordpress

I've been inundated with spam recently, up till the point I've had to install some stupid maths plug-in to annoy people try and stop it.

The main problem is not the spam, as it all ends up in Akismet, it's very accurate..the problem is when there is false positives and real comments end up in Akismet, there are just too many comments to go through and fish out the real ones, (200-400 per day)...so I just end up deleting all and often losing real comments.

I've decided most spam is not actual comments posted through the form but auto-generated Trackbacks, that's how it seems anyway.

I've installed a trackback validator plugin, but that's really not helping as it just ends up in Akismet with all the other crap, so I still have trouble spotting the real comments.

I also installed Did You Pass Math? (DYPM) But it just seems to annoy people and doesn't do anything about Trackback spam.

What I've come to think is the the most sensible solution is to disable old Trackbacks, as real Trackbacks are most likely to come on new posts.

So go to your database or in my case phpMyAdmin on my domain and bring up the SQL query box, then paste this in:

Update wp_posts
set ping_status = "closed"
where post_date < "2006-12-01"

You can change the date to suit when you want to turn off Trackbacks, just make sure you keep the date in the same format.

phpMyAdmin returned "Affected rows: 593 (Query took 0.0375 sec)"

And that was that, Trackbacks were turned off for old posts before December 1st, 2006!

Even with this and DYPM disabled, I get about 60 spam comments a day, so the best solution is to disable old trackbacks and keep DYPM installed and active.

I'm loath to disable comments for old posts as I still get people popping up and commenting on old posts regularly.

This brings spam back down to a manageable level (just a few each day).

7 comments