How to Disable Comments in WordPress (Every Method)

Some WordPress sites genuinely don’t need comments. Brochure sites, portfolios, business pages, sites that moved their conversation to Discord or email. Comments add admin overhead and a spam vector with no real upside if nobody’s actually commenting.

This guide covers every way to turn WordPress comments off completely. Future posts, every existing post, individual posts, the comment leftovers in your admin, and the comment template in your theme. Pick the method that matches what you need to disable.

Want to keep comments but stop spam? That’s a different problem. Read how to stop WordPress spam comments instead. Tools like Akismet, Cloudflare Turnstile, and a honeypot field will catch 99% of spam without disabling the comment system.

Method 1: Turn off comments on future posts

Go to Settings → Discussion, uncheck Allow people to submit comments on new posts, then save.

Important caveat: this only affects posts published after you change the setting. Existing posts keep whatever comment status they had when published. If you want to disable comments site-wide on content that already exists, skip ahead to Method 3 or Method 4.

Method 2: Disable comments on a single post or page

In the block editor, open the post and look for the Discussion panel in the right sidebar. Uncheck Allow comments and update.

If you don’t see the Discussion panel, click the three-dot menu in the top right, choose Preferences → Panels, and toggle Discussion on.

For sites still running the classic editor, click Screen Options in the top right, check Discussion, then scroll down to the Discussion box and uncheck Allow comments.

Method 3: Disable comments in bulk on existing posts

The setting in Method 1 only changes the default for new posts. To disable comments on content you already published:

  1. Go to Posts → All Posts
  2. Click the top checkbox to select every post on the screen
  3. Set Bulk Actions to Edit and click Apply
  4. In the bulk-edit panel that appears, set the Comments dropdown to Do not allow
  5. Click Update

Repeat for each page of posts, then again for Pages, then again for any custom post types you have. The default screen shows 20 posts at a time. You can bump that up under Screen Options at the top of the post list to speed things up if you have hundreds of posts.

Method 4: Disable comments on every existing post at once (WP-CLI)

If you have hundreds of posts across multiple post types, bulk edit gets old fast. WP-CLI handles every post in one command:

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

That sets comment_status=closed on every post and page in your database. Add custom post types to the --post_type list if you have them.

If your host doesn’t give you SSH access, the WP-CLI route is off the table. Most managed WordPress hosts do offer it (Kinsta, WP Engine, Cloudways, SiteGround) but shared hosts often don’t. In that case, fall back to Method 3 or 5.

Method 5: Disable comments globally with code

Drop this in your child theme‘s functions.php file (or use the Code Snippets plugin if you don’t want to touch theme files):

// 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' );
        }
    }
} );

That kills comments at the theme and front-end level. The comment form stops rendering, existing comments stop displaying, and the Discussion panel disappears from the editor for every post type.

This approach has one advantage over the plugin route: zero plugin overhead, no settings page to maintain. The downside is you have to remember the snippet exists if you ever switch themes (it lives in your child theme’s functions.php by default).

Method 6: Use the Disable Comments plugin

The Disable Comments plugin by WPDeveloper has 2M+ active installs and is the easiest one-click option:

  1. Go to Plugins → Add New, search “Disable Comments”
  2. Install the one by WPDeveloper and activate it
  3. Go to Settings → Disable Comments
  4. Choose Everywhere for a sitewide kill switch, or pick specific post types (Posts, Pages, Media)
  5. Save changes

The plugin handles everything Method 5 does, plus it removes the Comments menu, the Recent Comments dashboard widget, and the comment count from the admin bar automatically. Pick this option if you want a UI instead of code, or if a future site owner who isn’t technical might inherit the site.

Bonus: remove the comment leftovers from wp-admin

Even after disabling comments, WordPress keeps the Comments menu in the sidebar, the Recent Comments dashboard widget, and the comment counter in the admin bar. The Disable Comments plugin handles this for you. If you went the code route, add this snippet alongside Method 5:

// Remove Comments from the admin sidebar
add_action( 'admin_menu', function () {
    remove_menu_page( 'edit-comments.php' );
} );

// Remove the Recent Comments dashboard widget
add_action( 'wp_dashboard_setup', function () {
    remove_meta_box( 'dashboard_recent_comments', 'dashboard', 'normal' );
} );

// Remove the comment count from the admin bar
add_action( 'wp_before_admin_bar_render', function () {
    global $wp_admin_bar;
    $wp_admin_bar->remove_menu( 'comments' );
} );

// Redirect anyone who tries to load wp-admin/edit-comments.php directly
add_action( 'admin_init', function () {
    global $pagenow;
    if ( $pagenow === 'edit-comments.php' ) {
        wp_safe_redirect( admin_url() );
        exit;
    }
} );

That gives you a fully comment-free wp-admin: no menu, no widget, no admin bar count, and no way to land on the comments screen by accident.

For block themes (Full Site Editing)

If you use a block theme (Twenty Twenty-Three or any theme that ships a theme.json), comments are rendered by the Comments block in your single post template. Even after disabling comments globally, the block can leave behind a “Comments are closed” message on the front-end.

To remove it cleanly:

  1. Go to Appearance → Editor
  2. Click Templates and open the Single template
  3. Find the Comments block in the template (usually below the post content)
  4. Click the block, open the three-dot menu, choose Remove
  5. Save the template

The Comments Title, Comment Template, and Comments Pagination blocks are all children of the Comments block, so they all go with it.

How to delete existing comments

Disabling comments stops new submissions. Comments already in your database stay there. To wipe them:

Admin route: Comments → Empty Spam first to clear flagged comments. Then change the view to All, select all on the screen, and choose Move to Trash from Bulk Actions. Repeat per page.

WP-CLI route (cleaner):

wp comment delete $(wp comment list --format=ids) --force

That deletes every comment in your database in one shot. Don’t run it on a live production site without a backup. Once they’re gone, they’re gone, and there’s no undo.

Should you actually disable comments?

If your only reason is spam, filter instead of disable. Akismet handles 99% of WordPress spam, Cloudflare Turnstile blocks bots before they reach your form, and a honeypot field catches the rest. The full spam-filtering walkthrough covers all three.

That said, there are legitimate reasons to turn comments off entirely:

  • Brochure or business sites where conversation lives elsewhere (email, Discord, Slack)
  • Portfolios and landing pages where comments are visual noise
  • Sites where comment moderation eats more time than it produces value
  • Sites that get plenty of traffic but never generate quality discussion

Comments help SEO only when they generate real discussion that adds context to the page. An empty comment section, or one filled with spam, doesn’t help anything. The “comments improve SEO” advice is overstated when nobody’s actually commenting. If your site falls into that bucket, disabling is fine.

Frequently asked questions

How do I disable comments on a WordPress page (not a post)?

Same way as posts. Open the page in the block editor, find the Discussion panel in the right sidebar, and uncheck Allow comments. If the panel isn’t visible, enable it from the three-dot menu under Preferences → Panels. To do it for every existing page at once, use Method 3 or 4 above and target Pages instead of Posts.

I disabled comments but the form still shows up. Why?

The Settings → Discussion checkbox only affects new posts. Existing posts keep whatever comment_status they had at the time they were published. Use bulk edit (Method 3) or WP-CLI (Method 4) to update existing posts. If you want a guaranteed sitewide kill switch regardless of per-post settings, use Method 5 or Method 6.

How do I disable comments on media files (images)?

WordPress lets people comment on attachment pages by default. The functions.php snippet in Method 5 handles this because remove_post_type_support covers attachments. The Disable Comments plugin also has a Media checkbox in its settings.

Will disabling comments hurt my SEO?

No. Google does not require comments to rank a page. The “comments boost SEO” claim is overstated. Comments help only when they produce real discussion that adds context, fresh content, and long-tail keyword variations to a page. An empty comment section or one filled with spam is neutral at best. If your site doesn’t get organic discussion, disabling comments has no SEO downside.

What’s the difference between “close” and “disable” for comments?

WordPress stores comment state as comment_status on each post, with values open or closed. The Settings UI calls it “do not allow” or unchecking Allow comments. They all set the same database field. Closed and disabled are the same thing under the hood.

Can I disable comments only on old posts but keep them on new ones?

Yes. Go to Settings → Discussion, check Automatically close comments on posts older than X days, and set the cutoff (14, 30, 90 days). Comments stay open on recent posts and close automatically once posts hit the threshold. Useful for sites that want active conversation only on current content.

Pick the method that fits your setup

Six methods, one decision. Most sites are best served by either the Disable Comments plugin (one click, no code, ideal if a non-technical person might inherit the site) or the functions.php snippet in Method 5 (zero plugin overhead, fits the developer-leaning workflow). If you’re disabling because of spam, give Akismet or Cloudflare Turnstile a real test before pulling the plug. The spam-filtering guide walks through both.

Then run the WP-CLI delete command (or empty the comment trash from the admin) to clean out the existing comments and you’re done.

Picture of Andy Feliciotti

Andy Feliciotti

Andy has been a full time WordPress developer for over 15 years. Through his years of experience has built 100s of sites and learned plenty of tricks along the way. Found this article helpful? Buy Me A Coffee

Leave a Reply

Your email address will not be published. Required fields are marked *

WordPress Tips Monthly
Get the latest from SmartWP to your inbox.