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).

Comments

comments

Subscribe

You can subscribe via e-mail to get my posts in your Inbox, or stalk me on numerous other platforms.

Follow my Dayre!

, , , , , ,


7 Responses to Combating Spam – Disable Trackbacks for Older Posts in WordPress

  1. gbyeow February 15, 2007 at 1:53 pm #

    I switched on Akismet in August and it’s caught 25k spam since. Doing the maths, that’s averaging around 140 spam a day… I think for my case, there’s a bot spamming the older posts daily. There are several specific posts that are hit hard and I have an itch to switch off comments for those.

    Hulkragesmashspam!

  2. Boss Stewie February 15, 2007 at 6:18 pm #

    yeah my mailbox is full of spam too

  3. michaelooi February 15, 2007 at 7:00 pm #

    i was thinking of adding that math plugin too… maybe dump in questions with certain level of difficulty, just so you know, to keep out those really dumb trolls out from my blog. But then, I don’t get a lot of spams with Akismet… so, I’ll just wait and see…

  4. Matthew February 16, 2007 at 2:39 am #

    that’s the beauty of Xanga? Haha.

  5. Dabido (Teflon) February 16, 2007 at 10:29 am #

    Yeah, I installed DYPM a while ago as well. When I kept getting Spammed I e-mailed the guy who wrote the program and he told me I was getting trackback Spam from some guy in Russia.

    He also told me to turn off trackbakcs, which I didn’t want to do. [Due to the ocassional trackback I get].

    Thanx for the code, it saves me turning trackback off completely. I’ll be sticking it into my blog soon .

  6. Psycho Dude February 17, 2007 at 7:06 am #

    Spam definitely is online enemy number 1 and hard to battle off completely, but disabling trackbacks on old posts is indeed a good way of preventing an overload of spam. Fortunately I’m lucky enough and not having too much spam comments being submitted to my blog yet, so akismet serves just well for now on dealing with them.

  7. ShaolinTiger February 22, 2007 at 11:31 am #

    gbyeow: Yah it’s pretty insane, I was getting 300-400 a day sometimes, my total on this blog since I switched on Akismet is 49,355. If you follow the steps in this post you should get almost zero.

    michaelooi: Hahah that’s a good idea. Make it a twin feature..IQ test and anti-spam captcha. Well the problem was Akismet did catch all my spam, but I was getting too many so I couldn’t check for real comments that had gotten caught by mistake.

    Matthew: I’d rather not have a site where only members of a proprietary system can comment 😛

    Dabido (Teflon): Yah that’s why I had this bright idea, I didn’t want to shut off trackbacks, but it’s most likely I get trackbacks for posts in the last 1-2 months so I leave those on.

    Psycho Dude: I hope you stay spam free!