CJD Spam Nuker
Back in September of 2004 I released a plugin that allowed you to delete large amounts of spam with one click.
Basically one afternoon I was hit with a wave of spam that resulted in 1500+ comments awaiting moderation that were all spam. That was not a fun prospect, deleting all of those comments via the admin UI. So I took a trip to the terminal and issued one command, which wiped them all out.
So taking that experience I created a plugin that allowed you to delete comments by author, IP, email or URI. Now fast forward to WordPress 1.5. 1.5 has some wonderful toosl to help you combat spam built in, a blacklist feature, moderation by keywords and so on. At first I was stoked at how well these tools were working, I didn’t see any real waves of spam hitting my site, I was assuming that 1.5 was sending all that evil to /dev/null/ like a good little monkey.
I however, was very wrong.
Apparently the DEVs decided that what should happen is that anything that is considered spam will be flagged as such: ’spam’ and kept in the comments table in all our databases. I still fail to see the usefullness of this, but that was not my call. The point is that I was in my DB mucking around, as I am want to do, and found that I had 1500+ “spam” comments just hanging around in my comments table, with no way to interact with them from within WP. Now for me, that really isn’t a big deal, I just fire up the old terminal, or open phpMyAdmin and delete them that way. For the normal user though, that is another story.
Enter Spam Nuke
So I being the good samaritan I am, raised a feature request bug about this, and was basically told that you should just issue the
"DELETE from wp_comments WHERE comment_approved = 'spam'"; which my friends is crap. The normal user who cares about the size of thier DB should be able to easily and quickly get rid of that chaff from within WordPress.
Well now you can.
I had been meaning to update Mass Delete for 1.5 for some time. This answer from the DEVs gave me the impetus I needed to get it done. This new version serves two purposes:
Getting to the features
You can still delete groups of spam as you did originally, only now Mass Delete only deletes from comments flagged as spam, when you are successful you see this message:
The new feature is Mass Nuke, with one click you can nuke every comment in your table that is flagged as spam, when run successfully you see this message:
Not really much to it, really. Once the plugin is activated you can find it in the Manage submenu, there will be a selection labeled Spam at the end.
Here is the file you need cjd_delete.zip. Enjoy and let me know if you find any bugs, or have any comments.