I’ve been asked this a few times over the last little while. I don’t provide this post as a resource, but more as an “in case you were wondering”. There are better solutions, I’m sure, and more elegant ones, but this solution works for me.

1. Go to your WP Admin screen. Click the Options menu item. Select “Discussion” from the secondary navigation. Users must fill out name and email, and I block all comments with more than 2 links and approve them manually.
2. USE THE BLACKLIST functionality built into WP. Here’s my list:

nitin
loan
tax
bank
credit
debt
joe@aaa.com
dexatrim
diet
212.37.48.115
porn
adult
princeofprussia
clshi
ixm
smallbusinessbuddy
ozgression
64.254.209.254
dave@yahoo.com
headache
blackjack
texas-
online-
gaming-
casino
tramadol
-online
adipex
advicer
ambien
bllogspot
carisoprodol
casino
casinos
baccarrat
cialis
cwas
cyclen
cyclobenzaprine
day-trading
discreetordering
dutyfree
duty-free
fioricet
freenet-shopping
incest
levitra
macinstruct
meridia
online-gambling
paxil
phentermine
platinum-celebs
poker-chip
poze
prescription
soma
slot-machine
taboo
teen
tramadol
trim-spa
ultram
viagra
xanax
zolus
chatroom
blackjack

This deals with the default spammers as well as most of what I’ve come across.

3. Close all comments older than 30 days. 98% of comments are on older posts that have been thoroughly dug into Google’s index. Closing comments on these doesn’t reduce the amount of useful comments you get, since 99% of most people’s comments are on posts that are less than one week old. Here is the noddy code I use for this, I’ve inserted it in the wp-admin/post.php file, right at the top:

<?php

include (‘../wp-config.php’);

$age_cutoff = ’30 DAY’;

$cutoff_date = $wpdb->get_var (“SELECT DATE_ADD(DATE_SUB(CURDATE(), INTERVAL $age_cutoff), INTERVAL 1 DAY)”);

$wpdb->query (“UPDATE $tableposts SET comment_status = ‘closed’ WHERE post_date < '$cutoff_date' AND post_status = 'publish'");

?>