If you run a WordPress site and never read the comments, you are paying for them anyway — in spam, moderation time, and database bloat. Learning how to disable comments in WordPress takes about five minutes with the built-in settings. This guide shows you all four ways: the Discussion settings, bulk edit, a free plugin, and a few lines of code. Every step was checked against the current WordPress dashboard and plugin directory on 22 November 2026.
Comments made sense when every blog was a conversation. For many sites today — business sites, portfolios, documentation, landing pages — they are only a spam magnet, and that is why so many owners disable comments in WordPress entirely. Most of what arrives is automated junk: link drops, fake praise, phishing dressed as feedback. Turn the feature off, and readers can still reach you through a contact form or your social channels.
In this guide
- Why disable comments in WordPress?
- What “disable” actually means in WordPress
- Method 1: Disable comments in WordPress with the built-in settings
- Method 2: Close comments on existing posts in bulk
- Method 3: Use the Disable Comments plugin
- Method 4: Disable comments in WordPress with code
- The 4 methods compared
- How to disable comments on one post, page, or media file
- How to delete the comments you already have
- What to use instead of comments
- Frequently asked questions
- The verdict
Why disable comments in WordPress?
The most common reason to disable comments in WordPress is spam. A public comment form is an open door for bots, and once your site is on a spam list, the volume only grows. Filters catch most of it, but every spam comment still costs database rows, moderation clicks, and attention.
Time is the second reason. If nobody on your team reads or answers comments, the section is dead weight — a form that never gets a reply looks worse than no form at all. There is also a security angle: the form accepts input from strangers, which is exactly what spammers and scanners look for. Our WordPress security checklist covers the wider hardening steps, and knowing how to disable comments in WordPress is one of the cheapest wins on that list. The one exception: if your site is a community — a blog with real discussion, a membership site, a course with student questions — comments are the product, so leave them on.
What “disable” actually means in WordPress
Whether comments are open or closed is stored on each post, not on the site. Every post has its own comment status, and the Discussion screen only sets the starting value for posts you create in the future.
That is why the screen itself warns you, right under the checkboxes: “Individual posts may override these settings. Changes here will only be applied to new posts.” Unchecking the box does nothing to published posts — to disable comments in WordPress on those, you need Method 2 below.
Closing comments is also different from deleting them. Closing removes the form, so nobody can add new ones — but published comments stay visible until you delete them or hide them with a filter. Pingbacks and trackbacks are a third, separate switch: link notifications from other blogs, with their own checkbox.
Method 1: Disable comments in WordPress with the built-in settings
This is the fastest way to disable comments in WordPress, and it needs no plugin. It stops comments on every post you publish from now on.
- In your WordPress dashboard, go to Settings → Discussion.
- Under Default post settings, uncheck Allow people to submit comments on new posts — in older versions and the official docs, the same checkbox is labelled “Allow people to post comments on new articles”.
- Also uncheck Allow link notifications from other blogs (pingbacks and trackbacks) on new posts — pingbacks are almost entirely spam these days.
- Scroll down and click Save Changes.
That is the whole method: new posts are created with comments closed and the form does not appear. New pages are unaffected, because pages are created with comments closed by default. The catch is your existing content — this setting does not touch published posts, so combine it with Method 2, or the spam keeps arriving on the old ones. One middle ground on the same screen: under Other comment settings, Automatically close comments on articles older than [X] days closes comments on every post older than the number you enter; enter 0 to close them on existing posts immediately.
Method 2: Close comments on existing posts in bulk
Method 1 only covers the future. To disable comments in WordPress on the posts you already have, use bulk edit — no plugin and no code required.
- Go to Posts → All Posts.
- Open Screen Options at the top right and raise Number of items per page.
- Tick the checkbox in the table header to select every post on the page.
- In the Bulk actions drop-down, choose Edit and click Apply.
- In the bulk edit panel, set Comments and Pings to Do not allow.
- Click Update, then repeat for any further pages of posts.
Do the same at Pages → All Pages. Most pages never had comments open, but themes vary, and a quick pass costs nothing. Note that bulk edit closes the form — it does not delete published comments, which stay visible until you remove them. With hundreds of posts, work in batches and spot-check a few public posts after each batch.

Method 3: Use the Disable Comments plugin
If you want the job done everywhere at once — posts, pages, media, and the admin screens themselves — the free Disable Comments plugin is the standard tool to disable comments in WordPress, and it is actively maintained.
It launched in the WordPress.org directory on 27 May 2011 under Samir Shah, who ran it for nine years before auctioning it in August 2020; WPDeveloper won and has maintained it since. As checked on 22 November 2026, it has over 1 million active installs, a 4.7 out of 5 rating from 282 reviews, and version 2.9.2 was released on 19 November 2026, after a temporary directory closure notice in October 2026 was resolved.
Here is how to use it:
- Go to Plugins → Add New and search for “Disable Comments”.
- Click Install Now, then Activate.
- Go to Settings → Disable Comments and run the quick setup wizard, then choose Everywhere — or specific post types — and click Save Changes.
It does more than the built-in settings can: it hides the Comments links from the admin menu and bar, hides the Discussion settings page, disables comment feeds, removes the X-Pingback header, and blocks comments sent through the REST API and XML-RPC — the back doors bots use when the form is gone. It works on multisite networks, and its Delete Comments tool removes existing comments by type, including WooCommerce product reviews.
One warning from the plugin’s own documentation: delete existing comments before applying the setting, or some themes may keep showing them — use the Delete Comments tool first.
Method 4: Disable comments in WordPress with code
Code is the right choice if you want zero extra plugins. The core of it is three filters: comments_open and pings_open forced to false stop new comments and pingbacks, and comments_array forced to an empty array hides comments that already exist.
Option A: WPCode (recommended)
WPCode is a free code-snippet plugin, and the safest way to run this snippet — it survives theme updates, unlike editing a theme file. Install and activate it, then go to Code Snippets → Add Snippet → Add Your Custom Code (New Snippet), choose PHP, paste the snippet below, set it to run everywhere, and activate it.
Option B: functions.php in a child theme
If you prefer no plugin at all, add the snippet to your child theme’s functions.php — never the parent theme, whose next update would overwrite it and bring your comments back. No child theme yet? Our guide to how to create a WordPress child theme walks through it. Back up first — our WordPress backup guide covers the quick way — because a typo in functions.php can lock you out of your site.
// Disable comments and trackbacks on all post types
function bh_disable_comments_post_types_support() {
$post_types = get_post_types();
foreach ( $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' );
}
}
}
add_action( 'admin_init', 'bh_disable_comments_post_types_support' );
// 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 from displaying
add_filter( 'comments_array', '__return_empty_array', 10, 2 );
// Remove Comments from the admin menu
add_action( 'admin_menu', function() {
remove_menu_page( 'edit-comments.php' );
} );
Option C: A must-use plugin
For the most durable version, save the same code as wp-content/mu-plugins/disable-comments.php. A must-use plugin loads before themes, cannot be deactivated from the Plugins screen, and survives a theme switch. The trade-off: delete the file and every post goes back to whatever its own setting says.
The 4 methods compared
Each method works, but they cover different ground — pick the one that matches how much of the site you want to close down and how comfortable you are with code.
| Method | Best for | Existing posts | Needs a plugin | Skill level |
|---|---|---|---|---|
| 1. Discussion settings | New posts only, no fuss | No — new posts only | No | Beginner |
| 2. Bulk edit | Closing an existing archive | Yes | No | Beginner |
| 3. Disable Comments plugin | Whole site, including media and APIs | Yes | Yes (free) | Beginner |
| 4. Code snippet | Zero-plugin setups, multisite control | Yes | No (or WPCode) | Advanced |
For most sites, use Method 1 plus Method 2: the settings stop the future, bulk edit closes the past, and nothing new is installed. Reach for the plugin when you need to disable comments in WordPress on media attachments, the REST API, and the admin screens too. Use code only if you are comfortable maintaining it.

How to disable comments on one post, page, or media file
Sometimes only one post is the problem — a controversial article, or a page that keeps attracting spam. WordPress lets you close a single post without touching the rest, which is the gentlest way to disable comments in WordPress when you only need a partial fix.
In the block editor
Open the post or page, and in the settings sidebar open the Post tab and click Discussion. Set it to Closed, and turn off pingbacks and trackbacks too. If Discussion is missing, open the Options menu (three dots, top right) → Preferences and enable it under Document settings.
With Quick Edit
From Posts → All Posts, hover over the post title and click Quick Edit. Uncheck Allow Comments and click Update — the fastest route for a short list of posts. New pages are created with comments closed by default, so if a page shows a form, it was enabled deliberately, or by a theme.
On media attachments
Media attachment pages are the place people forget: every image gets its own attachment page, and on some themes that page shows a comment form — a spammer who finds it can post there even after you closed comments on every post. For one file, go to Media → Library, open the item, click Edit more details, and uncheck Allow comments under Discussion. There is no bulk edit for media, so for a large library the plugin or code method is the practical route to disable comments in WordPress on every attachment.
How to delete the comments you already have
Closing comments stops new ones; deleting removes the old ones. If you only close the form, the published comments stay on the page, still visible to visitors and search engines — so after you disable comments in WordPress, deleting the old ones is the last step.
To delete them by hand, go to Comments → All Comments, tick select-all, choose Move to Trash from Bulk Actions, and click Apply — then empty the trash, because comments in the trash still count until you do. The Disable Comments plugin is faster: its Delete Comments tool removes comments by type in one pass, including WooCommerce product reviews. Back up anything worth keeping first: deleting is permanent once the trash is emptied, while closing is reversible in one click.
What to use instead of comments
Removing comments does not mean removing contact. Readers with a genuine question need somewhere to go, or they will leave — and a site with no way to reach its owner looks unfinished. If you disable comments in WordPress, give readers a better channel in return.
The simplest replacement is a contact form. Our guide to how to add a contact form in WordPress sets one up in minutes, giving you a private, spam-filtered channel instead of a public one. If spam is the reason you are closing comments, add Google reCAPTCHA to WordPress on the form too — the same bots will try it next.
For discussion, point readers to your social profiles or a community space you actually moderate. A comments-off site is usually a faster one, too — a good moment to check performance with our guide to how to speed up WordPress.
Frequently asked questions
Does disabling comments delete the comments I already have?
No. To disable comments in WordPress is to close the form: nobody can add new comments, but published ones stay visible. Delete them from Comments → All Comments (select all, Move to Trash, empty the trash), or use the plugin’s Delete Comments tool.
Will disabling comments improve my site’s speed?
Slightly. Each comment is a database row, and the form adds page weight, but comments are rarely the main bottleneck. If speed is the goal, start with caching and image optimisation: see our guide to how to speed up WordPress.
Can I disable comments on some posts but keep them on others?
Yes — that is the selective way to disable comments in WordPress. Leave the Discussion settings alone and close comments per post: open it, set Discussion to Closed, or use Quick Edit and uncheck Allow Comments. Bulk edit works the same way for a selected batch.
Is the Disable Comments plugin safe to use?
Yes. It is free, maintained by WPDeveloper, with over 1 million active installs and a 4.7 out of 5 rating from 282 reviews as of 22 November 2026. Version 2.9.2 was released on 19 November 2026. Keep it updated like any plugin.
How do I disable comments in WordPress without a plugin?
Use the two built-in tools together: uncheck Allow people to submit comments on new posts in Settings → Discussion, then bulk-close existing posts (Posts → All Posts, select all, Bulk actions → Edit, Comments → Do not allow, Update). That covers posts and pages with no plugin at all.
Can I turn comments back on later?
Yes — every method here is reversible, except deleting comments. Re-check the Discussion setting, re-open posts with bulk edit, or deactivate the plugin or remove the snippet. Only deleted comments are gone for good, so back up before deleting.
The verdict
For most sites, the right answer is the simplest one: turn off Allow people to submit comments on new posts in Settings → Discussion, then bulk-close the posts you already have. Two screens, no plugin, no code, and the spam stops today. If you also want media attachments, the REST API, and the admin screens cleaned up, install the free Disable Comments plugin instead — the most complete one-click answer.
Do not overthink this. Comments are a feature, not an obligation. Close the form, give readers a contact form instead, and spend the moderation time on content. If you disable comments in WordPress today, the quieter dashboard tomorrow will tell you it was the right call.
Verdict: To disable comments in WordPress, uncheck “Allow people to submit comments on new posts” in Settings → Discussion and bulk-close your existing posts — no plugin needed. For the whole site including media and the REST API, the free Disable Comments plugin (v2.9.2, 1M+ installs) is the most complete one-click answer.
All steps and plugin details checked 22 November 2026 against the WordPress.org Settings Discussion screen documentation and the Disable Comments plugin page. Settings labels can vary slightly between WordPress versions — older versions label the main checkbox “Allow people to post comments on new articles”.