WordPress turns comments on by default, which made sense when every site was a blog. Today, many sites are business pages, portfolios or stores where a comment box under the “About” page looks odd and mostly attracts spam.
If you would rather keep comments and just stop the junk, my WordPress spam protection guide covers comments, forms and registrations.
The confusing part is that WordPress has several separate comment switches: one for new posts, one per post, one for pages, one for media files. Turning off the first does not touch the others. This guide will help you disable comments in WordPress, from a single checkbox to switching comments off everywhere in one go.
- Which Method Do You Need?
- Best Ways to Disable Comments in WordPress
- Method 1: Turn off comments on new posts
- Method 2: Disable comments on all existing posts (bulk edit)
- Method 3: Disable comments on a single post or page
- Method 4: Close comments automatically on older posts
- Method 5: Disable comments everywhere with a plugin
- Method 6: Disable comments with code (no plugin)
- Removing the comment section from block themes
- What about media attachment pages?
- WooCommerce Product Reviews
- Should you disable comments at all?
- FAQs related to How to Disable Comments in WordPress
Short Answer: To stop comments on future posts, go to Settings > Discussion and untick “Allow people to submit comments on new posts”. To turn them off on existing posts too, bulk edit your posts and set Comments to “Do not allow”. To kill comments everywhere at once (including media and the admin menu), install the free Disable Comments plugin.
Which Method Do You Need?
| Goal | Method | Plugin needed? |
|---|---|---|
| No comments on future posts | 1. Discussion settings | No |
| Close comments on all existing posts | 2. Bulk edit | No |
| Turn off comments on one post or page | 3. Per-post setting | No |
| Stop comments on old posts automatically | 4. Auto-close after X days | No |
| Disable comments everywhere, hide the menu | 5. Disable Comments plugin | Yes (free) |
| Developer, no plugin | 6. Code snippet | No |
Best Ways to Disable Comments in WordPress

Method 1: Turn off comments on new posts
- Go to Settings > Discussion.
- Untick “Allow people to submit comments on new posts”.
- Optional: also untick “Allow link notifications from other blogs (pingbacks and trackbacks)” to stop pingback spam.
- Click Save Changes.
This only affects posts you publish from now on. Existing posts keep their comment settings, which is why so many people think “it didn’t work”.
Method 2: Disable comments on all existing posts (bulk edit)
- Go to Posts > All Posts.
- Click Screen Options at the top and set “Number of items per page” to a high number (for example, 200), then apply.
- Tick the checkbox at the top of the list to select all posts.
- From Bulk actions, choose Edit and click Apply.
- Set Comments to “Do not allow” and click Update.
- Repeat for Pages if needed.
Existing comments stay visible. To remove them, go to Comments, select all and move them to Trash.
Method 3: Disable comments on a single post or page
- Open the post or page in the editor.
- In the right sidebar, open the Post (or Page) tab and find Discussion.
- Untick Allow comments (in newer versions, choose “Closed”).
- Click Update.
If you do not see the Discussion panel, open the three-dot menu > Preferences > Panels and switch it on.
Method 4: Close comments automatically on older posts
If you want comments on fresh posts but not on old ones (where most spam lands), go to Settings > Discussion, tick “Automatically close comments on posts older than X days” and set a number such as 30.
It is a good middle ground for active blogs.
Method 5: Disable comments everywhere with a plugin
The free Disable Comments plugin from WPDeveloper has more than a million active installs.
It turns off comments site-wide or by post type, hides comment menus and widgets from the dashboard, disables comment feeds and blocks comments sent through the REST API and XML-RPC, which is where a lot of bot spam comes from.
It can also bulk delete existing comments.
- Go to Plugins > Add New, search “Disable Comments”, install and activate it.
- Open Settings > Disable Comments.
- Choose Everywhere, or select post types (for example, Pages and Media only).
- Optionally use the Delete Comments tab to remove existing comments.
- Save.
Important note: Recent WordPress versions added collaborative “Notes” in the block editor, which use the comments system behind the scenes. Current versions of Disable Comments keep those editor notes working while disabling public comments. If you use a code snippet instead, test that your team’s notes still work.
Method 6: Disable comments with code (no plugin)
If you are comfortable with code, add a snippet using a code snippets plugin or a child theme’s functions.php.
This version closes comments and pingbacks on the front end and removes comment support from posts and pages:
add_action( 'init', function () {
foreach ( array( 'post', 'page', 'attachment' ) as $type ) {
remove_post_type_support( $type, 'comments' );
remove_post_type_support( $type, 'trackbacks' );
}
} );
add_filter( 'comments_open', '__return_false', 20 );
add_filter( 'pings_open', '__return_false', 20 );
add_filter( 'comments_array', '__return_empty_array', 10 );
add_action( 'admin_menu', function () {
remove_menu_page( 'edit-comments.php' );
} );
Always test snippets on a staging site first, and keep a backup. My backup plugins guide covers the easiest options.
Removing the comment section from block themes
On block themes like Twenty Twenty-Five, the comment form is a block inside the single post template. Even with comments closed, a “Comments are closed” message may appear.
To remove it, go to Appearance > Editor > Templates > Single Posts, select the Comments block and delete it, then save.
Classic themes usually hide the section automatically once comments are closed, or offer a theme setting for it.
What about media attachment pages?
Each uploaded image can have its own attachment page with comments open, which bots love. The Disable Comments plugin (choose Media) or the code snippet above handles this.
Most SEO plugins also let you redirect attachment pages to the file itself, which is a good idea anyway.
See the indexing section of my WordPress SEO guide.
WooCommerce Product Reviews
Product reviews use the comments system but have their own setting.
Go to WooCommerce > Settings > Products and untick “Enable product reviews” if you do not want them.
Should you disable comments at all?
- Disable them on business sites, portfolios, landing pages and any page where comments add nothing.
- Keep them on an active blog if readers ask useful questions; they add fresh content and show the post is alive.
- Middle ground: keep comments on posts, close them after 30 to 60 days, and use Akismet or Antispam Bee (both in my must-have plugins list) to filter spam.
Comment spam can also be a sign of wider bot activity. A good security plugin blocks a lot of it before it reaches your comment form.
FAQs related to How to Disable Comments in WordPress
Why are comments still showing after I disabled them?
The Discussion setting only affects new posts. Existing posts need a bulk edit (Method 2) or the Disable Comments plugin. Also clear your cache; see the steps in my caching plugins guide.
How do I disable comments on pages only?
Bulk edit your pages and set comments to “Do not allow”, or use the Disable Comments plugin and select only Pages.
Does disabling comments help SEO?
Not directly. It can help indirectly by removing spammy, low-quality comments and thin attachment pages.
Will disabling comments delete existing ones?
No. Existing comments stay in the database. Delete them from the Comments screen or with the plugin’s delete tool.
Can I turn comments back on later?
Yes. Re-enable the setting, bulk edit posts back to “Allow”, or deactivate the plugin.
Conclusion
For most business sites, the quickest clean solution is the free Disable Comments plugin set to “Everywhere”.
For blogs, untick comments on new posts if you do not want them, bulk edit old posts, and remove the comments block from your template. Either way, take two minutes to switch off pingbacks too.
They are almost entirely spam now.