I have been getting a huge amount of comment and trackback spam on some of my old WordPress blogs, it has got to the point where I am having to take action!

Upgrading from 1.2 and 1.5 to 2.1 is of course the first thing I am doing to plug the security holes, and then I am activating Akismet in the hope of combating future spam. The one thing that has always bugged me is the time it takes to delete the existing comment spam, either using ‘mass edit mode’ in the WordPress Dashboard, or by editing the database manually.

The problem with using ‘mass edit mode’ is that it shows 20 comments at a time, and that to me isn’t mass at all! Deleting 20 comments at a time obviously isn’t practical, but a here’s the tip: searching in ‘mass edit mode’ returns all relevant results on the one page. I search for ’1′ (as most IP addresses contain a ’1′), and this gives all the comments on the blog. Check the checkall checkbox, hit delete, and you’re done until next time.

A second tip: when setting up blogs that you don’t intend to maintain, change the default settings for comments & trackbacks. In the WordPress Dashboard go to Options >> Discussion and uncheck ‘Allow link notifications from other Weblogs (pingbacks and trackbacks.)’ and ‘Allow people to post comments on the article’. Then delete the ‘Hello World’ post and comment as pingbacks and trackbacks are enabled on there (stupid). This should cut down on future work :)