elegant themes

How to Re-enable and Allow Comments in Older Posts in WordPress

| November 15, 2011 | 1 Comment

We had a client come to us and ask how to re-enable comments on older posts. I started searching around and found 2 ways of allowing comments on many posts at once.

1. Use the built-in WordPress Bulk Edit feature.

This feature was introduced back in version 2.7 but only now did I fall in love with it!  It allows you to batch edit lots of information for multiple posts at one time: change categories, modify the author, change the post status, and most importantly (for me, right now), open or close comments.

To use it, go to:

  • Posts > All Posts
  • Select the posts you want to edit by checking off the checkboxes next to the post title.
  • Click on the Bulk Actions dropdown menu. 
  • Select Edit and click Apply. It’s a bit scary to have to click on Apply before you’ve made changes but once you build up the courage, it’s worth it! No changes will happen yet.
  • In the Comments dropdown, select Allow.
  • If you want to edit more than the default 20 posts per page in the admin screen, you can go to Screen Options in the top right corner and change the number of Posts Displayed per page.
  • Done! However, I had to check a few posts to make sure that it actually worked. I think that there is something buggy in the feature because it only worked some of the time. Maybe there is a max of how many posts can be bulk edited at once.

This method is good if you don’t want to get into the database. My only complaint is that it’s a bit time consuming and there’s no way of seeing a list of all the posts that have comments open or closed.

2. Do some SQL work in the Database

The other option for allowing comments globally in WordPress is to get into the PHPMyAdmin (ugh) and run a script to open all comments.  Although it can be scary to get into the database and run SQL queries, it is the most accurate way of making sure the comments are open on all your posts.

Here’s the SQL query to run to open all comments:

<code>UPDATE wp_posts SET comment_status = 'open';</code>

As you can see, each method has its pros and cons. Making this change within the dashboard is not as daunting but you don’t feel like you have as much control over the process. Also, it seems not to work 100% of the time, for some reason. And going into the database is, well, daunting. But otherwise, at least you know that it does what it’s supposed to do. It’s very possible that the dashboard direction is one we’d explain to a client but that if this is something we’re working on, we’ll prefer to go the database route.

0saves
If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Tags:

Category: Tips

About Rebecca Markowitz: Rebecca Markowitz has built over 40 WordPress sites for clients as Web Marketing Manager and WordPress specialist at illuminea. illuminea is a Jerusalem-based boutique web agency. WPGarage shows my dedicated relationship with WordPress over the years - full of love, laughs, tears, growth and strong drinks. L'chaim! View author profile.

solostream

Comments (1)

Trackback URL | Comments RSS Feed

  1. Konstantin says:

    Please keep in mind that wp_posts contains more than just your posts. It contains revisions, drafts, attachments, pages and custom post types, so firing your database request is dangerous. You probably wouldn’t want to have comments open on your About or Contact page. To solve that you can always restrict the query with post_status and post_type.

Leave a Reply




If you want a picture to show with your comment, go get a Gravatar.

More in Tips (4 of 83 articles)