WordPress lets you control whether visitors can comment on new posts and on content that has already been published. You can change the default for future posts, bulk-edit existing posts, or enable comments on selected articles. The safest approach is to use the WordPress dashboard rather than making broad database changes.
Disable comments on future WordPress posts
- Sign in to your WordPress dashboard.
- Go to Settings > Discussion.
- Under Default article settings, clear Allow people to submit comments on new posts.
- Save the settings.
This changes the default for newly created posts. It does not automatically close comments on posts that are already published.
Disable comments on existing posts in bulk
- Go to Posts > All Posts.
- Select the posts you want to change. If the list spans multiple pages, repeat the process on each page.
- Choose Edit from the Bulk actions menu and click Apply.
- In the bulk editor, set Comments to Do not allow.
- Click Update to save the selected posts.
Bulk editing affects only the posts you selected. Pages and other post types may need to be updated separately.
Enable comments on an individual WordPress post
- Go to Posts > All Posts and open the post you want to update.
- In the editor settings sidebar, find the Discussion panel or the Allow comments setting. In the Classic Editor, you may need to enable the Discussion panel from Screen Options.
- Enable comments and click Update.
You can also enable comments on several selected posts through the same Bulk Edit screen by setting Comments to Allow. Only select posts you actually want to reopen.
Disable comments with phpMyAdmin (advanced)
A direct SQL update can close comments on many posts, but it bypasses WordPress's normal editing workflow. Use this only if you understand the database, have a verified backup, and have checked which records the query will affect. A broad update can also change pages or posts where comments were intentionally left open or closed.
The example below closes comments on published posts only. It does not change pingbacks or trackbacks, and it assumes the default wp_ table prefix. Replace wp_posts with your actual table name.
SELECT ID, post_title, comment_status
FROM wp_posts
WHERE post_type = 'post'
AND post_status = 'publish'
AND comment_status <> 'closed';
Review the results first. If they are exactly the posts you intend to update, back up the database and run:
UPDATE wp_posts
SET comment_status = 'closed'
WHERE post_type = 'post'
AND post_status = 'publish'
AND comment_status <> 'closed';
Do not run a blanket query to reopen every closed post. Some posts may have comments disabled intentionally. Reopen comments through Bulk Edit or the individual post editor, selecting only the content you want to change.
Important things to know
- Future posts and existing posts are separate. The Discussion setting controls the default for new content; it does not rewrite existing posts.
- Comments can be closed automatically. The Discussion settings also include options for closing comments on older posts after a specified number of days.
- Bulk editing has a limited scope. Check the selected posts before applying changes, and repeat the process for other pages of results if needed.
- Database changes need a backup. SQL updates bypass WordPress's normal editing workflow and should be treated as advanced operations.
For more details, see the official WordPress documentation on Discussion Settings.
