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

Post to Twitter Post to Yahoo Buzz Post to Delicious Post to Ping.fm Post to StumbleUpon

  

Tags: , , , , , ,

Follow @ShaolinTiger on Twitter Follow me on Twitter Follow @ShaolinTiger on Twitter Subscribe to RSS Subscribe to RSS Subscribe to RSS

Posted in Internet & Tech | 7 comments -

Related Posts:
- Converting bBlog 0.76 to WordPress 2.0 (Import/Export) Script
- So here we are, New Look for 2006! Happy New Year
- Happy Anniversary to ShaolinTiger.com!
- Welcome to ShaolinTiger.Com Version 3 – Web2.0 Style
- Did Your Coppermine Gallery (CPG) Get Spammed? Eww Spam..
- Search/Find and Replace Using phpMyAdmin and MySQL

7 Comments so far

  1. gbyeow  on February 15th, 2007 at 1:53 pm
    Using Mozilla Firefox Mozilla Firefox 2.0.0.1 on Windows Windows XP 

    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  on February 15th, 2007 at 6:18 pm
    Using Mozilla Firefox Mozilla Firefox 2.0.0.1 on Mac OS Mac OS X 

    yeah my mailbox is full of spam too

  3. michaelooi  on February 15th, 2007 at 7:00 pm
    Using Mozilla Firefox Mozilla Firefox 2.0.0.1 on Windows Windows XP 

    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  on February 16th, 2007 at 2:39 am
    Using Mozilla Firefox Mozilla Firefox 2.0.0.1 on Windows Windows XP 

    that's the beauty of Xanga? Haha.

  5. Dabido (Teflon)  on February 16th, 2007 at 10:29 am
    Using Mozilla Firefox Mozilla Firefox 1.5.0.9 on Windows Windows XP 

    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 [I hope ... if I get time ... ].

  6. Psycho Dude  on February 17th, 2007 at 7:06 am
    Using Mozilla Firefox Mozilla Firefox 1.5.0.9 on Windows Windows Vista 

    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  on February 22nd, 2007 at 11:31 am
    Using Mozilla Firefox Mozilla Firefox 2.0.0.1 on Windows Windows XP 

    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 :P

    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!

Leave a reply


Stalk Me

  • Follow Me on Twitter!
  • Users Online

    Sponsor

    Recent Comments

    Top Commentators

    Topics

    Blog Stuff


  • Other Links

    Powered By

  • Linux
  • Apache
  • PHP
  • MySQL
  • Get Firefox!
  • WordPress is a state-of-the-art semantic personal publishing platform
  • FileZilla
  • Free Source Code Editor!
  • Photoshop CS2