How to Disable Comments in WordPress (2026) — 4 Methods Without a Plugin
WordPress comments attract more spam than conversation, slow down page load with Gravatar requests, and clutter pages where you never wanted them in the first place. Here are the four methods that actually disable them — site-wide, per post type, or per post — including the one-line filter that overrides everything else.
Key Takeaways
- Discussion → Settings only affects new posts — existing posts keep their original setting.
- To disable comments on all existing posts: Bulk Edit in Posts → All Posts, or one WP-CLI command.
- The most reliable method is a
comments_openfilter that returnsfalse— overrides every per-post setting. - The popular Disable Comments plugin (by WPDeveloper, 2M+ installs) does all of this through a UI, including removing the comments admin menu.
- CSS hide tricks leave the comment markup in the HTML source — search engines and screen readers still see it. Use a real filter instead.
Method 1: Discussion Settings (New Posts Only)
The simplest way to stop comments on future posts:
- Go to Settings → Discussion in your WordPress dashboard.
- Uncheck "Allow people to submit comments on new posts".
- Click Save Changes.
Method 2: Bulk Edit (Disable on All Existing Posts)
Use this to retroactively disable comments on posts you already published:
- Go to Posts → All Posts.
- Click Screen Options (top right) → set Number of items per page to a number larger than your post count (e.g., 999).
- Check the top checkbox in the table header to select every post.
- From the Bulk actions dropdown, choose Edit → click Apply.
- In the bulk edit panel, set Comments to Do not allow → click Update.
Repeat for the Pages screen if you want to disable comments on pages too. For sites with thousands of posts, use WP-CLI instead:
# Disable comments on every post
wp post update $(wp post list --post_type=post --format=ids) --comment_status=closed
# Same for pages
wp post update $(wp post list --post_type=page --format=ids) --comment_status=closed
Method 3: Code Snippet (The Definitive Fix)
For total control, add this to your child theme's functions.php or to a Code Snippets entry:
// 1. Disable comments and pings on all post types, ignoring per-post settings
add_filter( 'comments_open', '__return_false', 20, 2 );
add_filter( 'pings_open', '__return_false', 20, 2 );
// 2. Hide existing comments from the front-end (return empty array)
add_filter( 'comments_array', '__return_empty_array', 10, 2 );
// 3. Remove the Comments admin menu item
add_action( 'admin_menu', function() {
remove_menu_page( 'edit-comments.php' );
} );
// 4. Remove Comments from the admin bar
add_action( 'wp_before_admin_bar_render', function() {
global $wp_admin_bar;
$wp_admin_bar->remove_menu( 'comments' );
} );
This four-block snippet covers every surface where comments appear: the front-end form, existing comment listings, the WP-Admin sidebar, and the top admin bar counter. Because comments_open is filtered with priority 20, it overrides the per-post Discussion meta box and any plugin that sets it earlier.
comments_open filter intercepts every call site-wide at runtime, so it works even on posts that were saved with comments allowed years ago.
Method 4: Disable Comments Plugin
If you'd rather not edit code, the Disable Comments plugin by WPDeveloper (2M+ active installs) does the same thing through a settings panel:
- Install Disable Comments from Plugins → Add New.
- Go to Settings → Disable Comments.
- Choose Everywhere to disable site-wide, or On certain post types to keep comments on, e.g., posts but not pages.
- Click Save Changes. The plugin also offers a one-click Delete Comments tool to wipe existing spam from the database.
The plugin is multisite-aware, has no settings page bloat, and unlike a code snippet it can be reverted by deactivating. For most non-developers, it's the right choice.
What Not to Do — CSS Hide
Tutorials sometimes suggest:
#comments, #respond { display: none; }
This hides the visual section but the comment HTML and form action still ship to the browser. Spambots scrape the markup and submit anyway, search engines index the spam, and screen readers announce it. Use Method 3 or 4 to remove it from the server-side render.
Method Comparison
| Method | Affects existing posts? | Removes admin menu? | Survives theme updates? | Best for |
|---|---|---|---|---|
| Discussion settings | ❌ No | ❌ No | ✅ Yes | Brand-new sites |
| Bulk Edit / WP-CLI | ✅ Yes | ❌ No | ✅ Yes | One-time cleanup |
| functions.php filter | ✅ Yes (overrides) | ✅ Yes | ✅ Yes (child theme) | Developers, permanent fix |
| Disable Comments plugin | ✅ Yes | ✅ Yes | ✅ Yes | Non-coders, multisite |
| CSS hide | ❌ Visual only | ❌ No | ✅ Yes | Don't use |
How SimpleReview Handles This
If your site is already loaded with thousands of spam comments and you don't trust yourself to pick the right method, SimpleReview can do it in three clicks:
- Install the Chrome extension and open any post on your WordPress site.
- Click the SimpleReview icon, then click the comments section below the post.
- Type "Disable comments site-wide" and click Fix it. SimpleReview adds the four-block
comments_opensnippet to your child theme's functions.php, opens a PR, and (optionally) runs a WP-CLI command to delete existing spam.
It's particularly useful when you have a custom theme with comment templates spread across multiple files, or when a previous developer added their own filters that you'd rather not break.
Disable WordPress Comments in 3 Clicks
Click on any element on your site — SimpleReview identifies the right hook, writes the snippet, and opens a PR.
Install SimpleReview Chrome Extension →Prefer a WordPress plugin? Download SimpleReview for WordPress → — installs in 30 seconds, no Chrome required.
Frequently Asked Questions
wp post update $(wp post list --post_type=post --format=ids) --comment_status=closed in WP-CLI instead.comments_open filter (Method 3) to override per-post settings retroactively.comments_array filter returning an empty array (Method 3) removes existing comments from the front-end without deleting them from the database.add_filter('comments_open', function($open, $post_id){ return get_post_type($post_id) === 'page' ? false : $open; }, 20, 2); Or use the Disable Comments plugin's "On certain post types" option.