CommentSpam

HomePage | RecentChanges | Preferences | Costa Rica Wiki

From [burningbird]

In the meantime, clean up:

The only easy way to clean up is directly in MySQL?. Even *mt-blacklist will require that you hunt down each individual URL and delete it -- time consuming. If you don't know how to access MySQL? then ask for help in comments, send me an email, or ask help from your friends online.

In MySQL? directly, or through PHPAdmin, to remove the comments, use the following:

    delete from mt_comment where comment_created_on > '2004-01-12 15:40:08';

Change the date to fit your needs, the format is yyyy-mm-dd hh:mm:ss. This will delete all comments after the timestamp. Be careful or you'll lose comments you want to keep. In fact, always make a backup before you start global deletions. You can use mysqldump to back up your entire database at any time (check MySQL? site for how to use mysqldump). Or you can use MT's backup.

Once deleted, rebuild your site to clear the comments from your pages.

If you want, you can turn off comments on all entries older than 30 days using the following SQL:

    update mt_entry set entry_allow_comments = 2 where
    TO_DAYS(NOW()) - TO_DAYS(entry_created_on) >= 30;

This closes comments on all entries 30 days old or older. Most comment spams are on older content, which are also less likely to have legitimate comments so this isn't a bad option. You can run this yourself manually every week or so, or you can add it as a cron job. If you're unfamiliar with cron, holler.

Or for a range, delete from mt_comment where comment_created_on > '2004-03-16 15:41:10' AND comment_created_on < '2004-03-17 16:41:10'; etc.

And when I finally get around to upgrading my version of MT, the plug-in to close old comments off. http://www.rayners.org/2003/12/27/closing_comments_on_old_entries.php


HomePage | RecentChanges | Preferences | Costa Rica Wiki
This page is read-only | View other revisions
Last edited March 18, 2004 12:10 am (diff)
Search: