HowTo: Mark a large number of comments as spam in Wordpress
Taking a cue from bindanaku here I finally got rid of all the spam filling up my moderation queue. Now the search begins for how to block a particular phrase.
This is the MySql query I used. I had to go to CPanel and then find phpmyadmin. From there it’s obvious where to type this in.
UPDATE `wp_comments` SET `comment_approved` = 'spam' WHERE `wp_comments`.`comment_approved` ='0' LIMIT 5
Or if you’re particular about which IPs you want to ban:
UPDATE `wp_comments` SET `comment_approved` = 'spam' WHERE `wp_comments`.`comment_approved`='0' AND `wp_comments`.`comment_author_IP` LIKE '62.213%'
If you want to delete stuff, use: DELETE from `wp_comments` WHERE [your conditions]
Naturally, one changes the limit to the number of spam messages. The reason this needs to be done is that the moderation page refuses to open past 6000 in the queue or so. I had 16,900 when I finally managed to get rid of them. Yes, I have Akismet installed and no, I won’t install Captcha codes, people hate filling in captcha codes and the few comments I have may dissappear.
Posted by roshan.george under Internet |

Just implement a simple CAPTCHA.
There was one I encountered some time ago that asked a simple mathematical question.
Comment by Marc — May 25, 2007 @ 11:42 pm
People hate captchas Marc. I want some comments atleast.
Comment by roshan.george — May 26, 2007 @ 2:48 am
A simple numerical one. What is 1+2?
Comment by Marc — May 26, 2007 @ 3:21 pm
Then Chetan won’t be able to post.
Comment by roshan.george — May 26, 2007 @ 7:53 pm
Not everyone is a mathematical genius like you.
Comment by Marc — May 26, 2007 @ 8:31 pm
GEEKY stuff ! Im not able to get one word of it
Comment by Arun M — May 26, 2007 @ 10:28 pm
Quite naturally, it’s not like everyone knows the advanced math necessary to do that.
Comment by roshan.george — May 27, 2007 @ 12:00 pm
[...] If it’s too late and you’ve ended up in this situation, you can try marking them all as spam using phpmyadmin and sql. [...]
Pingback by George Files » I get loads of spam — October 31, 2007 @ 7:40 pm
very interesting, but I don’t agree with you
Idetrorce
Comment by Idetrorce — December 16, 2007 @ 3:16 am