• Each week I have to delete between 500 and 1000 spam comments that are blacklisted, but still in the database. This doesn’t take a huge amount of time, as I do it via mass editing, but it does take time nonetheless. Is there any way to just have them automatically deleted when they are blacklisted so I don’t have to bother with doing it myself?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Which version are you using?

    Thread Starter pezastic

    (@pezastic)

    WP 1.5

    Sort of….

    SELECT * FROM wp_comments WHERE comment_approved = 'spam'

    Paste that into the SQL Query box from phpMyAdmin
    Click Go
    All the comments marked as spam will then be listed
    Scroll to the bottom of the page (the results will be paged, typically in sets of 30)
    Click to check all the boxes
    Delete.
    Repeat per page.

    WARNING: SQL queries can be dangerous. SQL queries do not know what “Undo” or “Oops” or “WTF was that ?” are, so be careful. That said, I run that command on my db …. but I make no guarantees.

    This is part of why I think spam >anything< should be stored in a completely separate table… so even if you nuke THAT table, you don’t nuke the main comments… should add that to my next CG-AntiSpam, to move spam stuff into a sep table once ID’d.

    -d

    Thread Starter pezastic

    (@pezastic)

    I already have been using the Paged Comment Editing Plugin, which allows me to delete spam comments exclusively in mass editing pages of up to 9999 comments each. So, that isn’t a problem.

    I wanted to know if there was any way to have them just go away without me having to do anything? BTW, why are they stored in the DB in the first place?

    They are stored in the db so they may be ‘available’ for analysis by any future code / plugin.
    Given 2 things:
    1 – Comment spam is widespread enough for blog-specific analysis to not really be necessary
    2 – This accumulation can seriously increase db size (though it has to be said that this has NO performance issues)
    I think this should be either an option, or we should have a ‘one-click kill all’ button.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Auto remove blacklisted spam commments?’ is closed to new replies.