Affiliate disclosure: Some of the links in this article are affiliate links that may provide us with a small commission at no cost to you. This is helping us to create free content to help you and manage the running cost of this blog. Thank you for your support.

How to Disable Comments in WordPress: 6 Easy & Proven Methods

WordPress turns comments on by default, which made sense when every site was a blog. Today, many sites are business pages, portfolios or stores where a comment box under the “About” page looks odd and mostly attracts spam.

If you would rather keep comments and just stop the junk, my WordPress spam protection guide covers comments, forms and registrations.

The confusing part is that WordPress has several separate comment switches: one for new posts, one per post, one for pages, one for media files. Turning off the first does not touch the others. This guide will help you disable comments in WordPress, from a single checkbox to switching comments off everywhere in one go.

Short Answer: To stop comments on future posts, go to Settings > Discussion and untick “Allow people to submit comments on new posts”. To turn them off on existing posts too, bulk edit your posts and set Comments to “Do not allow”. To kill comments everywhere at once (including media and the admin menu), install the free Disable Comments plugin.

Which Method Do You Need?

GoalMethodPlugin needed?
No comments on future posts1. Discussion settingsNo
Close comments on all existing posts2. Bulk editNo
Turn off comments on one post or page3. Per-post settingNo
Stop comments on old posts automatically4. Auto-close after X daysNo
Disable comments everywhere, hide the menu5. Disable Comments pluginYes (free)
Developer, no plugin6. Code snippetNo

Best Ways to Disable Comments in WordPress

How to Disable Comments in WordPress
How to Disable Comments in WordPress

Method 1: Turn off comments on new posts

  1. Go to Settings > Discussion.
  2. Untick “Allow people to submit comments on new posts”.
  3. Optional: also untick “Allow link notifications from other blogs (pingbacks and trackbacks)” to stop pingback spam.
  4. Click Save Changes.

This only affects posts you publish from now on. Existing posts keep their comment settings, which is why so many people think “it didn’t work”.

Method 2: Disable comments on all existing posts (bulk edit)

  1. Go to Posts > All Posts.
  2. Click Screen Options at the top and set “Number of items per page” to a high number (for example, 200), then apply.
  3. Tick the checkbox at the top of the list to select all posts.
  4. From Bulk actions, choose Edit and click Apply.
  5. Set Comments to “Do not allow” and click Update.
  6. Repeat for Pages if needed.

Existing comments stay visible. To remove them, go to Comments, select all and move them to Trash.

Method 3: Disable comments on a single post or page

  1. Open the post or page in the editor.
  2. In the right sidebar, open the Post (or Page) tab and find Discussion.
  3. Untick Allow comments (in newer versions, choose “Closed”).
  4. Click Update.

If you do not see the Discussion panel, open the three-dot menu > Preferences > Panels and switch it on.

Method 4: Close comments automatically on older posts

If you want comments on fresh posts but not on old ones (where most spam lands), go to Settings > Discussion, tick “Automatically close comments on posts older than X days” and set a number such as 30.

It is a good middle ground for active blogs.

Method 5: Disable comments everywhere with a plugin

The free Disable Comments plugin from WPDeveloper has more than a million active installs.

It turns off comments site-wide or by post type, hides comment menus and widgets from the dashboard, disables comment feeds and blocks comments sent through the REST API and XML-RPC, which is where a lot of bot spam comes from.

It can also bulk delete existing comments.

  1. Go to Plugins > Add New, search “Disable Comments”, install and activate it.
  2. Open Settings > Disable Comments.
  3. Choose Everywhere, or select post types (for example, Pages and Media only).
  4. Optionally use the Delete Comments tab to remove existing comments.
  5. Save.

Important note: Recent WordPress versions added collaborative “Notes” in the block editor, which use the comments system behind the scenes. Current versions of Disable Comments keep those editor notes working while disabling public comments. If you use a code snippet instead, test that your team’s notes still work.

Method 6: Disable comments with code (no plugin)

If you are comfortable with code, add a snippet using a code snippets plugin or a child theme’s functions.php.

This version closes comments and pingbacks on the front end and removes comment support from posts and pages:

add_action( 'init', function () {
    foreach ( array( 'post', 'page', 'attachment' ) as $type ) {
        remove_post_type_support( $type, 'comments' );
        remove_post_type_support( $type, 'trackbacks' );
    }
} );
add_filter( 'comments_open', '__return_false', 20 );
add_filter( 'pings_open', '__return_false', 20 );
add_filter( 'comments_array', '__return_empty_array', 10 );
add_action( 'admin_menu', function () {
    remove_menu_page( 'edit-comments.php' );
} );

Always test snippets on a staging site first, and keep a backup. My backup plugins guide covers the easiest options.

Removing the comment section from block themes

On block themes like Twenty Twenty-Five, the comment form is a block inside the single post template. Even with comments closed, a “Comments are closed” message may appear.

To remove it, go to Appearance > Editor > Templates > Single Posts, select the Comments block and delete it, then save.

Classic themes usually hide the section automatically once comments are closed, or offer a theme setting for it.

What about media attachment pages?

Each uploaded image can have its own attachment page with comments open, which bots love. The Disable Comments plugin (choose Media) or the code snippet above handles this.

Most SEO plugins also let you redirect attachment pages to the file itself, which is a good idea anyway.

See the indexing section of my WordPress SEO guide.

WooCommerce Product Reviews

Product reviews use the comments system but have their own setting.

Go to WooCommerce > Settings > Products and untick “Enable product reviews” if you do not want them.

Should you disable comments at all?

  • Disable them on business sites, portfolios, landing pages and any page where comments add nothing.
  • Keep them on an active blog if readers ask useful questions; they add fresh content and show the post is alive.
  • Middle ground: keep comments on posts, close them after 30 to 60 days, and use Akismet or Antispam Bee (both in my must-have plugins list) to filter spam.

Comment spam can also be a sign of wider bot activity. A good security plugin blocks a lot of it before it reaches your comment form.

Why are comments still showing after I disabled them?

The Discussion setting only affects new posts. Existing posts need a bulk edit (Method 2) or the Disable Comments plugin. Also clear your cache; see the steps in my caching plugins guide.

How do I disable comments on pages only?

Bulk edit your pages and set comments to “Do not allow”, or use the Disable Comments plugin and select only Pages.

Does disabling comments help SEO?

Not directly. It can help indirectly by removing spammy, low-quality comments and thin attachment pages.

Will disabling comments delete existing ones?

No. Existing comments stay in the database. Delete them from the Comments screen or with the plugin’s delete tool.

Can I turn comments back on later?

Yes. Re-enable the setting, bulk edit posts back to “Allow”, or deactivate the plugin.

Conclusion

For most business sites, the quickest clean solution is the free Disable Comments plugin set to “Everywhere”.

For blogs, untick comments on new posts if you do not want them, bulk edit old posts, and remove the comments block from your template. Either way, take two minutes to switch off pingbacks too.

They are almost entirely spam now.

Sending
User Review
0 (0 votes)

Umapathy Sekar is a Passionate Blogger and Internet Marketer. He has more than 8 years of experience in Blogging and Affiliate Marketing. At WPSBlog.com, he writes mostly about WordPress related articles. You can follow him on Twitter and Linkedin.