16 Jul
I shut the comment down yesterday. Today, I woke up to two more spam comments claiming to be two of my regular posters. I thought that I shut it down correctly, but then I realized that the “disallow comment” setting is not retroactive.
I found this post, which helped me deal with this issue. In short, you have to run a very simple SQL query against your WordPress wp_posts table:
UPDATE wp_posts p SET comment_status = ‘closed’,
ping_status = ‘closed’ WHERE comment_status = ‘open’
With that done, I’m going to leave comments open on my latest posts, and manually close them after a week or so. My next task is to find a way to do this automatically . If you have any suggestions on how to accomplish this, I’d appreciate it.
To you spammers: My most frequent commentators are my friends and family. I know the email addresses that they use. I look at every single comment that hits this blog. Please stop trying to pose as them - you are wasting your time.
Edit: I was getting ready to implement the solutions provided by Doug and Joe. Then I saw one of the comments made by someone posting as Tito:
I would recommend the Comment Timeout Plug in. Or the core solution.
I can’t believe I overlooked WordPress’ built-in function. I enabled it, and it seems to be working.
6 Responses for "That Didn’t Go As Planned"
Hey Will. I would just run that SQL statement on cron except add an additional where clause stipulating where time() - date_posted > 7 days. (Obviously that’s pseudo-code)
Think of you often and hope you are well!
In your crontab you’ll want to do something like this (pseudocode):
mysql -uuser_name database_name -e”UPDATE wp_posts p SET comment_status = ‘closed’, ping_status = ‘closed’ WHERE comment_status = ‘open’ AND created_at > (now minus 7 days)”
Damn it Will, how else am I going to get my porn business off the ground?!?!?!?!
Is it that serious? I wonder at time what do they gain from posting on other peoples site. I have over 15k spams on the othere sites. seriously, whats in it for them?
I would recommend the Comment Timeout Plug in. Or the core solution. There are number of ways to automate the process.
I also think as a blogger, that I would rather see comments closed only after inactivity…
It is really sad to see your Blog being spammed. I loved your site and it has good things like your stories and it has reall good interface. Keep it like that always. You have good audiences who are there to support you always. Thanks John75