How to Enable or Disable WordPress Comments? You might be asking: How do I disable comments on WordPress without a plugin? How can I enable comments for all posts?
WordPress offers several methods to manage comments. You can use the dashboard's built in settings for safer and more accessible options or modify the database directly for bulk changes. Here's are sections outlining the steps for both.
Using the WordPress Dashboard
Disable Comments on Future Posts
- Log in to your WordPress dashboard.
- Go to Settings > Discussion.
- Under Default article settings, uncheck the option labeled "Allow people to submit comments on new posts".
New posts created after this change will have comments disabled by default.
Disable Comments on Existing Posts
- Navigate to Posts > All Posts.
- Select the posts you want to update by using the checkboxes. To select all, check the box at the top of the list.
- From the Bulk Actions dropdown, choose Edit and click Apply.
- In the bulk edit options, set Comments to Do not allow, then click Update.
Enable Comments on Specific Posts
- Go to Posts > All Posts.
- Click the title of the post you want to update.
- If you don’t see the Discussion box, click on Screen Options (top-right) and check Discussion.
- In the Discussion box, check Allow comments, then click Update.
Using phpMyAdmin (Advanced Users)
With WordPress, you can globally disable comments if you do not want to allow comments to be placed on your blog. Since this information is stored in the database, we can edit the allow comments option (open or close comments) across the entire blog in one step. The following section explains how to remove all instances of Allow Comments by using an SQL database query.
Note: This process assumes you have access to phpMyAdmin and are comfortable making database changes. Back up your site before proceeding!
Disable WordPress Comments on All Posts
- Log in to your phpMyAdmin control applet.
- Locate and select your WordPress database from the list on the left.
- Click the SQL tab at the top.
- Paste the following SQL query into the query box, then click Go:
UPDATE wp_posts SET comment_status = 'closed', ping_status = 'closed' WHERE comment_status = 'open';
If your database uses a custom prefix (e.g., wp123_), replace wp_posts with your prefix.
Enable WordPress Comments on All Posts
- Follow the same steps to log in to phpMyAdmin.
- Select your WordPress database.
- Click the SQL tab and run the following query:
UPDATE wp_posts SET comment_status = 'open', ping_status = 'open' WHERE comment_status = 'closed';
As before, ensure your prefix matches your database configuration.
Important Considerations
- Backups: Always back up your WordPress site and database before making bulk changes.
- Theme Compatibility: Ensure your WordPress theme supports comment display.
- WordPress Updates: Regularly check WordPress documentation for the latest comment management features.
Final Thoughts on Disabling Comments
Managing comments on your WordPress site doesn’t have to be complicated. Whether you’re looking for a quick solution using the dashboard or a bulk change via phpMyAdmin, the methods outlined in this tutorial will help you achieve your goals. Remember to always back up your site before making changes, and use the method that best suits your level of experience and comfort.
By taking control of your comments, you can maintain a cleaner and more focused blog while enhancing your site's user experience. Happy blogging!