February 4, 2005

Cleaning up your blog

Here's how to sort out your MovableType 2.661 installation if you're plagued by trackback spam or comment spam, using SQL (if you've got a db backend):

Turn off comments on articles older than seven days:

UPDATE mt_entry SET entry_allow_comments = 2 WHERE entry_blog_id=1 AND entry_created_on < date(current_timestamp) - '7 days'::interval;

Turn off trackback pings on all entries:

UPDATE mt_entry SET entry_allow_pings=0;

Remove all unwanted recent pings (adjust XX based on when your last useful ping was):

DELETE FROM mt_tbping WHERE tbping_id>XX;

Hope that helps.

Posted by savs at February 4, 2005 10:58 AM
Comments

Dude, your RDF knickers are showing.

You can't have two consecutive -'s in an HTML comment for starters. That might be the problem.

Posted by: Alex Hudson at February 4, 2005 7:11 PM

I know ... I haven't figured out why it suddenly started happening. Something to do with disabling trackbacks. Sheesh. Nothing's ever easy, is it? ;-)

Posted by: Andrew Savory at February 4, 2005 7:50 PM

OTTOMH, it looks like there is a logic error in your trackback disable. The -- problem I mentioned is in the RDF URL to the trackback ping - maybe you need to insert a ! somewhere to inverse the logic (since disabling the trackback should also remove the URL from the RDF, and as the problem is new it presumably wasn't there before, so the logic is the wrong way around?)

Posted by: Alex Hudson at February 5, 2005 8:10 PM