How to Completely Disable Comments in WordPress (Without a Plugin Mess)

Here’s a question I ask every new client: does anyone actually leave comments on your site?

The answer, nine times out of ten, is no. What they do get is spam. Dozens of spam comments per day about casinos, CBD oil, and SEO services — all of which they’re either moderating manually or ignoring while their database fills up.

WordPress enables comments by default on every post. For blogs with active communities, that’s great. For the other 90% of WordPress sites — business sites, portfolios, landing pages, WooCommerce stores — it’s just unnecessary weight.

What does “comments” actually mean in WordPress?

It’s more than just a text box under your posts. WordPress comments are an entire system:

  • A database table (wp_comments and wp_commentmeta) that stores every comment and its metadata
  • Comment forms on posts and pages
  • A comment RSS feed accessible to anyone
  • An admin menu item (Comments) in the dashboard
  • Discussion settings across multiple admin pages
  • Pingbacks and trackbacks — automated comments from other sites
  • A Recent Comments widget
  • Comment-related REST API endpoints

Unchecking “Allow comments” in Settings → Discussion only prevents new comments on future posts. Existing posts keep their comment forms. Pages might still have them. The admin menu item stays. The RSS feed remains. It’s a half-measure.

Why should you care?

Spam is relentless. If comments are enabled, you’re a target. Even with Akismet, spam comments consume server resources — each one triggers database writes, email notifications, and spam-check API calls. I’ve cleaned client databases with 50,000+ spam comments stored in wp_comments — pure dead weight.

Unnecessary database queries. WordPress checks comment status on every page load, even when you have zero comments. Those queries add up, especially on shared hosting where database performance is already tight.

Admin clutter. The Comments menu item, the discussion meta boxes on every post editor screen, the Screen Options for comment columns — it’s visual noise for features you’re not using.

SEO risk. Comment sections with spam or low-quality content can dilute your page quality. Google sees that content as part of your page. A comment section full of “Great post! Visit my site at…” links isn’t helping your rankings.

The quick fix

To truly disable comments in WordPress, you need to address multiple layers. Here’s the comprehensive approach — add this to a site-specific plugin or your child theme’s functions.php:

// Close comments and pingbacks on all post types
add_action( 'admin_init', function() {
    // Redirect any direct access to the Comments admin page
    global $pagenow;
    if ( $pagenow === 'edit-comments.php' ) {
        wp_safe_redirect( admin_url() );
        exit;
    }

    // Remove comment support from all post types
    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' );
        }
    }
});

// Close comments on the frontend
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 admin menu
add_action( 'admin_menu', function() {
    remove_menu_page( 'edit-comments.php' );
});

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

// Remove comment feed links from head
add_filter( 'feed_links_show_comments_feed', '__return_false' );

That’s a lot of hooks for something that should be a single setting. This is exactly why many people reach for a plugin instead — but then you’ve installed yet another plugin for what amounts to removing a feature.

The one-click solution

OvKit consolidates all of this into a single toggle. Go to Features → Cleanup, flip Disable Comments, and every layer is handled: comment forms, admin menus, admin bar, feeds, REST API endpoints, post type support, and existing comment visibility.

No leftover comment tables clogging your database. No admin menu items you’ll never click. No spam to moderate.

What happens after you fix this?

  • Comment forms disappear from all posts and pages — no template editing needed
  • The Comments admin menu vanishes — cleaner dashboard
  • Comment feeds stop working — one less thing for scrapers to index
  • Spam comments stop accumulating — database stays lean
  • Page load gets slightly faster — fewer database queries per page

Your existing comments stay in the database (nothing is deleted), so if you ever re-enable comments, they’ll reappear. If you want to permanently delete existing comments, you can run a SQL query: TRUNCATE TABLE wp_comments; TRUNCATE TABLE wp_commentmeta; — but back up your database first.

FAQ

Can I disable comments on pages but keep them on blog posts?

Yes, but that requires per-post-type control rather than a global disable. In WordPress, you can bulk-edit posts and change their comment status. Or use OvKit’s more granular settings to disable by post type. The code above is the nuclear option — everything off, everywhere.

Will disabling comments affect my existing content or SEO?

No. Your posts, pages, and all other content remain untouched. Google doesn’t penalize sites for not having comments. In fact, removing low-quality comment sections can improve your content quality signals. The comment text itself is hidden but not deleted from the database.

I use WooCommerce — will disabling comments break product reviews?

WooCommerce product reviews use the WordPress comment system under the hood. If you globally disable comments, you’ll lose product reviews too. If you need reviews on products but not on pages/posts, use post-type-specific settings instead of a global disable. OvKit lets you exclude WooCommerce products from the comment disable rule.


Related reads: