Wordpress Comment and Trackback (Ping) Spam…

Fri, May 19th 2006

Comment spam is a fun thing. See, a spammer uses a script to harvest the posts on your blog and then attempts to add comments to your posts that contain ads and links for their viagra and insurance and stuff. Neat! Dasspunk.com is currently enjoying the attentions of just such a spammer… So I figured I should help discourage such behavior by explaining how you might go about stopping it…

Now if you allow anyone to comment on you blog without being registered, you are clearly desperate for friends and should welcome these spammers with open arms (because you already are). If not and you’re still getting spam, then you need to turn off Trackbacks (Pings). Trackbacks are a nice little invention that was meant to enable communication between blogs. The premise is nice but the only folks that use it are spammers… so turn ‘em off. Here’s a little checklist:

  1. Log into your WordPress Admin
  2. Under Options/General check the box Users must be registered and logged in to comment
  3. Under Options/Discussion, uncheck the option Allow link notifications from other Weblogs (pingbacks and trackbacks.)

Okay, unfortunately, this will only protect your future posts… any existing post with pings enabled will still be targets. So you’ll need to either edit each post by hand and uncheck the “Allow Pings” (under Discussion section) or, if you’ve got access to your database, you can change them all with a single command. Now, before you do this or any edit on your database, make a backup of it! That said, here’s the command you’ll need to run (probably in phpmyadmin) to turn off pings on all of your posts:

UPDATE `posts` SET `ping_status` = ‘closed’;

Hope this helps and good luck.





1 Comment »

rrqueen writes:

Or, just be extremely boring in your blahging, and no one will read it, thus no one will spaminate you.

That, or “look at the big brain on Brian”.

Comment - May 19, 2006 @ 3:17 pm

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.