WordPress: Automatically close comments on old blog entries

There used to be a plugin that would scan your WordPress blog for posts that were past a certain age and close the comments functionality on them.

Why? Because when the conversation dies down, sometimes you want to move on. Plus, old blog posts are generally a target for spammers.

I'm not sure when this happened, but the ability to auto-close comments has been built into the core of WordPress now, and I'm going to show you how easy it is to configure this feature.

Configuration

(I'm doing this from a WordPress blog running version 2.7.1, by the way)

  1. Log into your WordPress admin panel
  2. Browse to Settings -> Discussion
  3. Under the section "Other comment settings", enable the option to "Automatically close comments after..." and set the number of days to close comments after. I think the default of 14 days is too short a time to leave a discussion thread open. For my blogs, between 60 and 90 days is the value I use.
  4. Remember to scroll the bottom and click Save changes for the new settings to take effect.

Now that you've revisited the Discussion settings in WordPress, you'll probably be salivating about the other new options that are available, such as nested comments and paging comments. I haven't played around with these too much yet, but when I upgrade some of my WordPress themes to be nested comments compatible, I'll share my notes here!

Subscribe with Add to Google or Subscribe to netvibes

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <p> <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <table> <thead> <tbody> <tr> <td> <h2> <h1> <h3> <h4> <h5> <div> <object> <embed> <param> <br>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <drupal5>, <drupal6>, <javascript>, <mysql>, <php>. The supported tag styles are: <foo>, [foo].
  • Links to specified hosts will have a rel="nofollow" added to them.

More information about formatting options

To prevent automated spam submissions leave this field empty.
Mollom CAPTCHA (play audio CAPTCHA)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.