WordPress Disable/Enable Comments on Existing/Old Posts
There are 2 simple ways in WordPress to disable/enable comments on existing/old posts all at once. These are discussed below:
- Use the built-in WordPress Posts Bulk Edit feature.
This WordPress feature allows you to edit lots of information for multiple posts all at once: including changing categories, modifying the author, changing the post status, and most importantly (for you, right now), open or close WordPress posts comments.
To use it, go to:
- WP Admin dashboard > Posts > All Posts
- Select the posts you want to edit by checking off the check boxes next to the post title.
- Click on the Bulk Actions drop-down 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 drop-down, select Allow. This tells WordPress to disable/enable comments on existing/old posts all at once.
- 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, check a few posts to make sure that it actually worked.
This method is good if you don’t want to interfere with the WordPress database. Only limitation is that it’s a bit more 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 setting WordPress to disable/enable comments on existing/old posts all at once is through editing via the PHPMyAdmin and run a script to open all comments. This is the most accurate way of making sure all the posts comments are set to open/close.
Here’s the SQL query to run to open all comments:
UPDATE wp_posts SET comment_status = ‘open’;
UPDATE wp_posts SET comment_status = ‘close’;
Hope that helps!
Recommended Posts
How To Disable WordPress Theme Update Notification (No Plugin)
September 14, 2021
How to Hide Featured Image in Single Post on WordPress
October 8, 2020
How to Track WordPress Site Searches in Google Analytics
October 6, 2020