Deleting 2000 SPAM comments

Discussion in 'WordPress' started by Red_Virus, Nov 13, 2008.

  1. #1
    What do you think is the best method to delete around 2000 spam comments on my wordpress blog ? is there a script that deletes all the comments in wordpress ?
     
    Red_Virus, Nov 13, 2008 IP
  2. mcfox

    mcfox Wind Maker

    Messages:
    7,526
    Likes Received:
    716
    Best Answers:
    0
    Trophy Points:
    360
    #2
    Aren't you running Askimet? That would catch most, if not all of them and then it's a simple bulk delete.
     
    mcfox, Nov 13, 2008 IP
  3. deluxdon

    deluxdon Catch Me If You Can...!!!™ Staff

    Messages:
    25,482
    Likes Received:
    1,943
    Best Answers:
    32
    Trophy Points:
    480
    #3
    To delete all current comment spam entries run this query on your Wordpress database with phpMyAdmin in the SQL page:

    DELETE FROM 'wp_comments' WHERE 'comment_approved' = 'spam'
    Code (markup):
    It is advisable to take backup first.

    Source

    DON.
     
    deluxdon, Nov 13, 2008 IP
    mcfox likes this.
  4. Red_Virus

    Red_Virus Well-Known Member

    Messages:
    3,756
    Likes Received:
    249
    Best Answers:
    0
    Trophy Points:
    135
    #4
    Perfect Don, that is exactly what I was looking for will take a backup now.

     
    Red_Virus, Nov 13, 2008 IP
    deluxdon likes this.
  5. spencerp

    spencerp Well-Known Member

    Messages:
    222
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    130
    #5
    Or, you could just use this WP plugin. I think the original plugin author removed it, as he went with Habari or whatever. But I still have a copy of it around.

    spencerp.net/files/CJDSpamNuke.php.txt

    Just download that file to the desktop, and remove the trailing ".txt" off the end of it. Or, save it as:
    CJDSpamNuke.php. That should work! At least you can "weed out" the possible good comments from the bad ones. Sometimes some of my friends got listed as "spam" and they were also removed as well as the spam itself. But, if you don't care about that, then it's just as easy as hitting the "Nuke em all!" button. :p :D
     
    spencerp, Nov 13, 2008 IP