Stephanie Leary

Writer and WordPress consultant

  • Books
    • Content Strategy for WordPress (2015)
    • WordPress for Web Developers (2013)
    • Beginning WordPress 3 (2010)
  • Blog
    • Fascism Watch (2016-17)
    • Content Modeling for WordPress series
    • WordPress Hidden Gems series
  • Work
    • Portfolio
    • Services
    • WordPress Plugins
    • WordPress Themes
    • Presentations and Interviews
    • on GitHub →
  • About
    • Press Kit
  • Contact
    • Mailing List

Closing old comment threads and dealing with spam

November 5, 2003 Stephanie Leary

Some of you may have noticed the atrocious comment spam that’s been popping up here lately. I’ve deleted the comments as I’ve found them, but the spammers are finding old comment threads and flooding them with junk.

When the new version of MT came out, I upgraded, but didn’t do anything about the new feature that lets you close old comment threads. I’ve just closed all but a handful. Rather than do it by hand for 450+ entries, I used a little SQL that I’m sharing here for those who don’t deal with databases on a regular basis:

update mt_entry set entry_allow_comments = 2 where entry_blog_id = 1;

This closes all comment threads in the blog whose ID is 1. (To find out what your blog ID is, check the URL while you’re managing your blog. You should see “&blog_id=[number]” somewhere toward the end.)

To reopen the comments on your last few posts, find the entry ID (again, check the URL) of the earliest one you want comments on, and then use this:

update mt_entry set entry_allow_comments = 1 where entry_blog_id = 1 and entry_id > #;

where # is the entry ID you found. Or, you can find that ID before you run the first command, and do it in one step:

update mt_entry set entry_allow_comments = 2 where entry_blog_id = 1 and entry_id < #;

You can reopen the comments on a single old post by doing something like this:

update mt_entry set entry_allow_comments = 1 where entry_blog_id = 1 and entry_id = 258;

You’ll need to rebuild when you’re done. And when you’re done you can, like me, put installing MT-Blacklist on your weekend to-do list.

Blogging

Fascism Watch

The Fascism Watch is a daily(ish) news roundup. View all the previous Fascism Watch posts »

Latest WordPress Book

Content Strategy for WordPress

A short book for content strategists and managers on implementing a complete content strategy in WordPress: evaluation, analysis, content modeling, editing and workflows, and long-term planning and maintenance.

Read the sample chapter

Kindle Nook iBooks Kobo Smashwords

WordPress for Web Developers

WordPress for Web Developers (9781430258667)

This is a book for professional web designers and developers who already know HTML and CSS, and want to learn to build sites with WordPress. The book begins with a detailed tour of the administration screens and settings, then digs into server-side topics like performance and security. The second half of the book is devoted to development: learning to build WordPress themes and plugins.

This is the second, much-revised and updated edition of Beginning WordPress 3, with a more accurate title. Everything’s been updated for WordPress 3.6.

WordPress for Web Developers is out now. See what's inside...

The best WordPress features you’ve never noticed

  • WordPress Hidden Gems: Screen Options
  • WordPress Hidden Gems: Bulk Edit
  • WordPress Hidden Gems: Private Status
  • WordPress Hidden Gems: Dashboard Feed Readers
  • WordPress Hidden Gems: Options.php

Content Modeling for WordPress series

  • Content modeling for WordPress, part 1: analyze content
  • Content modeling for WordPress, part 2: functional and organizational requirements
  • Content modeling for WordPress, part 3: a sample content model

This is an excerpt from Content Strategy for WordPress.My latest books are Content Strategy for WordPress (2015) and WordPress for Web Developers (2013). Sign up to be notified when I have a new book for you.

Copyright © 2021 Stephanie Leary