Menu

How to Disable Comments in WordPress: The Complete Comprehensive Guide

by theanh May 10, 2026

Why You Might Want to Disable WordPress Comments

While the ability for readers to engage with your content is a cornerstone of the blogging experience, not every website needs a comment section. For brochure-style business sites, professional portfolios, or landing pages, comments can often become more of a liability than an asset. They introduce administrative overhead and create a primary vector for spam bots, which can degrade the professional appearance of a site.

Whether you have moved your community discussions to platforms like Discord or Slack, or you simply want a cleaner, more streamlined user interface, knowing how to effectively silence the comment system is essential. This guide explores every available method to disable comments, ranging from simple settings changes to advanced developer snippets.

Method 1: Disabling Comments for Future Posts

If you want to ensure that any new content you publish does not have an open comment section, you can adjust the global default settings. Navigate to Settings → Discussion in your WordPress dashboard. Uncheck the box labeled “Allow people to submit comments on new posts” and save your changes.

Important Note: This setting is not retroactive. It only applies to posts created after the setting was changed. Existing content will remain unchanged, meaning you will need a different approach to handle previously published posts.

Method 2: Targeted Disabling on Individual Posts or Pages

Sometimes you may want comments on a deep-dive tutorial but not on a ‘Contact Us’ page. To do this on a per-page basis:

  • Block Editor: Open the post/page, locate the Discussion panel in the right-hand sidebar, and uncheck “Allow comments.” If the panel is missing, access it via the three-dot menu (top right) → Preferences → Panels.
  • Classic Editor: Click Screen Options at the top of the page, ensure “Discussion” is checked, and then uncheck “Allow comments” in the Discussion box below the editor.

Method 3: Bulk Disabling Existing Content

For those with a growing library of content, manual editing is inefficient. To disable comments in bulk:

  1. Navigate to Posts → All Posts.
  2. Select all posts using the top checkbox.
  3. Under Bulk Actions, select Edit and click Apply.
  4. Change the Comments dropdown to “Do not allow” and click Update.

Remember to repeat this process for Pages and any Custom Post Types you may have active on your site.

Method 4: The Power-User Approach (WP-CLI)

For developers or site owners with SSH access, the WordPress Command Line Interface (WP-CLI) is the fastest way to scrub comment availability across thousands of posts instantly. Use the following command:

wp post update $(wp post list --post_type='post,page' --format=ids) --comment_status=closed

This command targets every post and page in the database and sets their status to closed in seconds, bypassing the need to click through pages in the admin dashboard.

Method 5: Global Disabling via Code (functions.php)

To ensure comments are disabled site-wide regardless of individual post settings, you can add a filter to your child theme’s functions.php file or use a plugin like Code Snippets. This method is lightweight and prevents the need for additional plugins.

// Close comments on the front-end
add_filter( 'comments_open', '__return_false', 20, 2 );
add_filter( 'pings_open', '__return_false', 20, 2 );

// Hide existing comments add_filter( 'comments_array', '__return_empty_array', 10, 2 );

// Remove comments from post type support add_action( 'admin_init', function () { foreach ( get_post_types() as $post_type ) { if ( post_type_supports( $post_type, 'comments' ) ) { remove_post_type_support( $post_type, 'comments' ); remove_post_type_support( $post_type, 'trackbacks' ); } } } );

Method 6: The One-Click Solution (Disable Comments Plugin)

If you prefer a user interface over code, the Disable Comments plugin by WPDeveloper is the gold standard. With millions of installs, it provides a centralized dashboard to kill comments everywhere or target specific post types (Posts, Pages, Media). This is the ideal choice for sites that may be handed over to non-technical clients in the future.

Cleaning Up the WordPress Admin Interface

Even after disabling the functionality, WordPress often leaves “ghost” remnants in the dashboard, such as the Comments menu in the sidebar or the Recent Comments widget. To achieve a truly clean admin experience, you can use the Disable Comments plugin or add a specific snippet to remove these elements, including the comment count from the top admin bar and redirecting anyone who attempts to access edit-comments.php.

Handling Block Themes and Full Site Editing (FSE)

Modern block themes (like Twenty Twenty-Three) use a Comments block in the single post template. Even if comments are disabled in the backend, a “Comments are closed” message may still appear on your live site. To remove this: navigate to Appearance → Editor → Templates → Single, locate the Comments block, and delete it entirely from the template.

FAQ: Common Concerns

Will disabling comments hurt my SEO?
Generally, no. While organic, high-quality discussion can provide long-tail keywords, an empty or spam-filled comment section provides no SEO value. Google does not penalize sites for lacking a comment section.

How do I delete old comments already in the database?
You can manually move them to trash via the Comments menu or use WP-CLI for a total wipe: wp comment delete $(wp comment list --format=ids) --force.

What if I only want to stop spam?
If you value community engagement but hate spam, don’t disable comments. Instead, implement tools like Akismet, Cloudflare Turnstile, or honeypot fields to filter out the noise while keeping the conversation open.

Leave a Reply