# How to Enable or Disable Comments in WordPress

Canonical URL: https://lancelhoff.com/enable-or-disable-comments-on-all-posts-in-one-step/
Published: 2007-02-21
Last modified: 2007-02-21
Description: Learn how to enable or disable WordPress comments on new posts, existing posts, or selected articles using Discussion settings and bulk editing.

---

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

1. Sign in to your WordPress dashboard.
2. Go to **Settings > Discussion**.
3. Under **Default article settings**, clear **Allow people to submit comments on new posts**.
4. 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

1. Go to **Posts > All Posts**.
2. Select the posts you want to change. If the list spans multiple pages, repeat the process on each page.
3. Choose **Edit** from the **Bulk actions** menu and click **Apply**.
4. In the bulk editor, set **Comments** to **Do not allow**.
5. 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

1. Go to **Posts > All Posts** and open the post you want to update.
2. 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**.
3. 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.

```sql
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:

```sql
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](https://wordpress.org/documentation/article/settings-discussion-screen/).
