Tag Archives: spam

Bulk Clean-up of ‘Approved’ Spam Comments

I recently had to clean up the database for a WordPress installation where several thousand spam comments had managed to slip by the filters and get themselves approved. Naturally, going through and marking each individual one as spam would have been a mind-numbing and infuriating process, and there is no ‘Check for Spam’ button in the approved comments queue. Obviously, you can’t allow those spam comments to just sit there, so here’s the solution. Fair warning: it’s a bit geeky.

Log into your phpMyAdmin interface and navigate to the comments table (wp_comments by default). Click on the SQL tab ,paste this snippet of code in, and click ‘Go.’

UPDATE wp_comments SET comment_approved='0' WHERE comment_approved='1'

This will bump all approved comments back to a pending status, which you can then go into and click the ‘Check for Spam’ button. Depending on your server’s settings and the number of spam comments you have to deal with (7000+ in my case), you may end up with a timeout error of some kind, which is ok. Just back up your browser and repeat the check process until all spam comments have been filtered into the appropriate queue. What you should have left are your legitimate comments. (Any leftover spam you should be able to clean up manually without too much trouble.)

From there, depending on how many legitimate comments you have remaining in the pending queue, you can either do a bulk approve using WordPress’s native functions or simply reverse the SQL command you issued above:

UPDATE wp_comments SET comment_approved='1' WHERE comment_approved='0'

Voila! Like magic (and with a bit of brute force), you’ve just gotten rid of a LOT of approved spam comments. It’s not necessarily the most elegant solution, but it beats having to click on every spam comment and preserves all the legitimate comments your readers have made.

Oh, and don’t forget to empty out your spam queue.

Closing Comments to Control Spam

About a week ago, I set WordPress to automatically close comments on posts over 90 days old on my Reclaimer website. Spam comments over there have become completely unreasonable lately, with Akismet catching and filtering out upwards of 300 spam a day. The vast majority ended up going into the Pending queue rather than the Spam queue for whatever reason. No big deal, mind you; it was only one additional step to filter them into the Spam buffer and then out of the system completely, but it was becoming a tad annoying. That was when I decided to try closing comments to see what effect it would have on spam. Very few of my readers, even new ones, ever comment on the old archives anyway, so cutting that section out of dialogue was no huge loss.

I also use the IntenseDebate commenting system on all my WordPress installations. I was puzzled to discover that setting WordPress to automatically close comments had no effect on IntenseDebate. I spent a little while trying to figure out why before finally giving up and just accepting that something somewhere was broken.

Today, it clicked in my head – IntenseDebate doesn’t replace the native WordPress commenting system; it simply overlays it. By changing the auto-close setting for comments, WordPress closed the native commenting system without affecting the IntenseDebate commenting system (which seems to be a little more robust about handling spam). Spammers appear to target the native WordPress commenting system while ignoring the IntenseDebate system – possibly because IntenseDebate loads via javascript – and since the native system is closed on the posts they target, they don’t have a way to infiltrate. In the last week, I’ve watched the number of spam that slip through go from 300+ a day to just one or two a day. The difference is remarkable, and I’ve heard zero complaints from readers about not being able to comment on older posts.

Probably I should have realized how this worked sooner, but sometimes I’m just a little slower on the uptake.

Twitter Spam and Follows

Spammers have infiltrated Twitter. This has been going on for a little while, but now they’re starting to irritate me just a bit. Basically what happens is that you have these Twitter accounts created, usually with just one tweet – a link to some sham website that will invariably try to take you for a ride. Like most spam messages, they promise fame, fortune, and too-good-to-be-true deals. Check out the profiles of these Twitter spammers and you’ll see that they are following thousands of _legitimate_ Twitter users.

Fine. This is all well and good. I always check everyone who follows me. I usually don’t return the follows unless I find that individual interesting. So when I discover that I’ve been followed by a Twitter spammer, I just ignore them so as not to subject myself to further Twitter spam from that account.

What I find somewhat surprising (but only a little) is how many followers some of these Twitter spammers have in return. Now, I wouldn’t be at all surprised to find that some of these followers are other Twitter spammers, but the vast majority are legitimate Twitter users who, presumably, just reflexively follow anyone who follows them. There seems to be an unspoken rule out there on Twitter that if someone follows you, you’re obligated to return the favor. This is a rule that makes little sense to me because ultimately it leaves you receiving thousands of tweets a day. I’m currently following almost 100 other Twitter users, and as it is I receive a couple of thousand tweets a day, most of which never get read simply because I haven’t the time. I can’t imagine what it’d be like if I were following every single one of the 60 people who are following me. It’d just be that many more tweets I don’t have time in a day to read or follow-up on.

Bad Behavior Behaves Badly

Well, _that_ was fun. I’ve been having some issues recently with a couple of my WordPress installations. In a nutshell, every form that has anything to with communication to the database was choking. Data wasn’t being saved to the database, screens weren’t loading properly, functions weren’t… functioning. It took me a little while of searching (and no little amount of stress and worry) but I finally stumbled across “a solution that just felt right”:http://wordpress.org/support/topic/108657?replies=8#post-562986. I’ve been using “Bad Behavior”:http://www.bad-behavior.ioerror.us/ for awhile now in conjunction with Akismet to catch and filter out spam. Between the two, they’ve done a fabulous job, making it a rare occurrence when even a single spam item slips through the cracks.

Unfortunately, apparently Bad Behavior has failed before, prompting an upgrade from 2.0.7 to the current version of 2.0.10. Trouble is, now 2.0.10 is malfunctioning and it blocking all scripts that had anything to do with communicating with the database. My guess is that something has gone wrong with Bad Behavior servers, potentially causing some sort of “feedback” loop. I – and a couple of others – have left comments notifying the author of the problem, so hopefully we’ll see a new version released in the near future. In the meantime, problem solved and everything seems to be functioning properly again.

Silly Spammers

International Opponents becomes White Circle in final:

White TV becomes Profound Chair in final to Play Table you should be very White , Profound, Bad, Good nothing comparative to Industrious Green Tournament becomes Astonishing Boy in final

two thumbs up mistery will opponents unconditionally

Hope Hope Love – that is all that Table is capable of when tournament love soldier increase , Table will Game unconditionally make hope roll – that is all that chips is capable of

Game will Plane unconditionally

when Slot Double Pair Destroy Grass can Play Round , Win Chair is very good Cosmos Player will Circle unconditionally

I’ve recently started using “Akismet”:http://akismet.com/ to filter out the spam garbage from my site, and honestly, I do find myself chuckling quite a bit as I check through the filter to make sure nothing legitimate got snagged by accident. Do spammers _really_ think that anyone is going to actually click on any of their links out of curiosity when the nonexistent syntax is such a thinly veiled attempt to steer you toward illegitimate websites. Now, I realize that most spam is pretty automated these days, but still, you’d think they’d at least _try_ to do a better job of disguising it, right? I’m glad they don’t, though; it makes it a lot easier to recognize it for what it is and get rid of it before it becomes a major nuisance.

Once More With the Housekeeping

Final note, hopefully, on the comment spam and trackback issue — I found a different bot check software called “Captcha!”:http://www.boriel.com/?page_id=17 that still provides the security of random image generation to prove human commenting but that also allows continued trackback capability. Non-registered users will have to type in the code at the bottom of the comment field before submitting, where registered users will not need to verify their comments. Oh, and let me know if you find the font too difficult to read because that’s an option I can change.

Enough of this….