Estimated reading time: 10 minutes
To disable comments in WordPress, go to Settings → Discussion and uncheck “Allow people to post comments on new articles.” This turns off comments on all future posts. For existing content, use the Bulk Edit feature or install the Disable Comments plugin to turn them off across your entire site.
WordPress enables comments on posts by default, which is great for blogs but unnecessary for business sites, portfolios, or landing pages. Leaving comments on when you don’t need them means dealing with spam, extra moderation work, and a less professional appearance.
The good news: WordPress gives you several ways to turn off comments, from a simple settings change to a full site-wide removal. This guide covers every method so you can pick the one that fits your situation.
Table of contents
- Choose the Right Method
- Disable Comments on All Future Posts
- Disable Comments on a Single Post or Page
- Disable Comments on Multiple Posts at Once
- Disable Comments on Media Attachments
- Disable Comments with a Plugin
- Disable Comments with Code
- Delete Existing Comments
- Remove the “Comments Are Closed” Message
- Why Disable Comments in WordPress?
- FAQ
- Wrapping Up
Choose the Right Method
Not every situation calls for the same approach. Use this table to jump to the method that matches what you need:
| What You Want to Do | Best Method | Difficulty |
|---|---|---|
| Stop comments on all future posts | Discussion Settings | Beginner |
| Turn off comments on one post or page | Individual post settings | Beginner |
| Turn off comments on many existing posts | Bulk Edit | Beginner |
| Remove comments from media attachments | Code snippet or plugin | Intermediate |
| Completely remove all comment features site-wide | Disable Comments plugin | Beginner |
| Programmatic control without a plugin | Custom code | Advanced |
Disable Comments on All Future Posts
This is the quickest way to stop new comments across your entire WordPress site. It takes about 30 seconds.
- In your WordPress admin dashboard, go to Settings → Discussion.
- Uncheck the box next to “Allow people to post comments on new posts.”
- Click Save Changes.

While you’re here, you can also uncheck “Allow link notifications from other blogs (pingbacks and trackbacks)” to disable those as well. Pingbacks generate automatic comments when other sites link to your content, and most site owners find them unnecessary.
Scope: This setting only affects posts and pages you create after saving the change. Any content you’ve already published keeps its current comment status. To turn off comments on existing content, use the Bulk Edit method below.
Disable Comments on a Single Post or Page
If you only need to close comments on specific content, you can do it directly from the post editor.
- Open the post or page you want to edit.
- Click the Settings icon (gear) in the top-right corner to open the sidebar.
- Scroll down to the Discussion section.
- Set it to “Closed“.
- Click Update to save.

Can’t find the Discussion option? Click the three-dot menu (⋮) in the top-right corner of the editor, select Preferences, go to the Panels tab, and make sure Discussion is enabled.
Good to know: WordPress disables comments on pages by default. You only need this step for pages where comments were previously turned on, or for individual posts you want to close.
Upgrade Your Website with a Premium WordPress Theme
Find a theme that you love and get a 10% discount at checkout with the FLASH10 code
Choose your theme
Disable Comments on Multiple Posts at Once
When you need to turn off comments on all existing posts (or a large batch of them), the Bulk Edit feature is the fastest built-in option.
- Go to Pages → All Pages.
- Check the box at the top to select all posts on the page.
- From the Bulk Actions dropdown, select Edit and click Apply.
- In the Bulk Edit panel, find the Comments dropdown and set it to “Do not allow.”
- Click Update.

Repeat the same steps under Posts → All Posts if you need to disable comments on posts too.
A note on large sites: WordPress shows 20 posts per page by default. If you have hundreds of posts, you’ll need to repeat this process across multiple pages. To speed things up, go to Screen Options at the top of the All Posts page and increase the number of items shown per page.
Scope: This method changes the comment status on existing published content. Combined with the Discussion Settings change above, you’ll have comments disabled on both old and new content.
Disable Comments on Media Attachments
Media attachments (images, videos, and documents) have their own comment settings in WordPress. Many site owners don’t realize this, which makes attachment pages a common target for spam comments.
The simplest fix is to add a small code snippet using the WPCode plugin:
- Install and activate WPCode from Plugins → Add New.
- Go to Code Snippets → Add New.
- Select “Add Your Custom Code (New Snippet)” and choose PHP.
- Paste this code:
function disable_media_comments( $open, $post_id ) {
$post = get_post( $post_id );
if ( $post->post_type == 'attachment' ) {
return false;
}
return $open;
}
add_filter( 'comments_open', 'disable_media_comments', 10, 2 );
- Toggle the snippet to Active and save.
If you’d rather not deal with code at all, the Disable Comments plugin (covered next) handles media attachments automatically when you set it to “Everywhere.”
Disable Comments with a Plugin
For the most thorough approach without touching any code, the Disable Comments plugin is the go-to choice. It has over 1 million active installations and removes every trace of the comment system from your site.
- Go to Plugins → Add New and search for “Disable Comments.”
- Install and activate the plugin.
- Navigate to Settings → Disable Comments.
- Select “Everywhere” to disable comments across all content types, or choose specific types (Posts, Pages, Media).
- Click Save Changes.

What this plugin does beyond basic settings
The plugin doesn’t just prevent new comments. It also:
- Removes the Comments menu item from the admin sidebar
- Hides the Recent Comments dashboard widget
- Disables the Discussion settings page
- Removes comment-related widgets from your theme
- Closes the comment RSS feed
- Works across custom post types
When to use this over built-in settings: If you want to completely wipe the comment system from your WordPress admin and frontend, this plugin is the cleanest option. Built-in settings just prevent new submissions. This plugin removes the entire infrastructure.
Disable Comments with Code
For developers or site owners who prefer not to add another plugin, you can disable comments programmatically. Add the following code to your theme’s functions.php file, or better yet, use a child theme or code snippet plugin so you don’t lose changes on theme updates.
// Disable comments and trackbacks on all post types
function 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', 'disable_comments_post_types_support' );
// Close comments on the frontend
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 admin menu
add_action( 'admin_menu', function () {
remove_menu_page( 'edit-comments.php' );
});
// Remove Comments link from admin bar
add_action( 'init', function () {
if ( is_admin_bar_showing() ) {
remove_action( 'admin_bar_menu', 'wp_admin_bar_comments_menu', 60 );
}
});
Here’s what each part does:
- disable_comments_post_types_support removes comment support from all post types in the admin
- comments_open and pings_open filters prevent new comments and pingbacks on the frontend
- comments_array filter hides any existing comments from displaying
- remove_menu_page removes the Comments link from your admin sidebar
- admin_bar_menu removal cleans up the admin bar
Scope: This covers both existing and future content. It’s the code equivalent of what the Disable Comments plugin does, without installing a plugin.
Delete Existing Comments
Disabling comments prevents new submissions, but it doesn’t remove comments that are already on your site. If you want a clean slate, here’s how to delete them.
From the WordPress Admin
- Go to Comments in your admin sidebar.
- Check the box at the top to select all comments.
- From the Bulk Actions dropdown, choose “Move to Trash” and click Apply.
- Click the Trash link, then Empty Trash to permanently delete them.

WordPress shows a limited number of comments per page, so you may need to repeat this process several times for larger sites.
Using a Database Query (Advanced)
For sites with thousands of comments, deleting through the admin can be slow. If you’re comfortable with phpMyAdmin or WP-CLI, you can clear the comments tables directly:
TRUNCATE wp_comments;
TRUNCATE wp_commentmeta;
⚠️ Warning: This permanently deletes ALL comments with no undo option. Back up your WordPress site first. If your database uses a custom table prefix (something other than wp_), adjust the table names accordingly.
Remove the “Comments Are Closed” Message
After disabling comments, some WordPress themes still display a “Comments are closed” message on your posts. This looks awkward and confuses visitors who never expected a comment section in the first place.
Quick Fix with CSS
Add this to Appearance → Customize → Additional CSS:
.nocomments {
display: none;
}
This hides the message visually. It works for most themes, though the exact CSS class may vary. Use your browser’s Inspect Element tool to find the right class if .nocomments doesn’t work for your theme.
Proper Fix via Template Editing
For a more thorough solution, locate the comments.php file in your theme and remove or comment out the line that outputs the “Comments are closed” text. Use a WordPress child theme so your edits aren’t overwritten when the theme updates.
Why Disable Comments in WordPress?
If you’ve already made up your mind, skip this section. But if you’re weighing the decision, here are the most common reasons WordPress site owners turn off comments:
- Spam reduction. Even with anti-spam plugins, comment spam is a constant maintenance task. Disabling comments eliminates it entirely.
- Professional appearance. Business sites, portfolios, and service pages look cleaner without an empty or messy comment section.
- Faster page loads. Each comment adds database queries. On posts with hundreds of comments, this can noticeably slow down your site.
- Less moderation work. No need to review, approve, or respond to comments if they’re not part of your content strategy.
- Security. Comment forms can be exploited for cross-site scripting (XSS) attacks or used to inject malicious links.
If you still want visitor engagement without comments, consider redirecting discussions to social media, a contact form, or a community forum.
FAQ
No. Disabling comments only prevents new submissions. Existing comments stay visible on your site until you manually delete them through the Comments section in your WordPress admin or via a database query.
Yes. WordPress disables comments on pages by default. If yours are enabled, use the Bulk Edit feature on your pages to set comments to “Do not allow” while leaving your post settings unchanged.
No. Google doesn’t penalize sites for having comments disabled. Comments rarely contribute meaningful SEO value, and removing spam-heavy comment sections can actually improve your site’s quality signals.
Closing comments (via post settings) stops new submissions but keeps existing comments visible and may show a “Comments are closed” message. Disabling comments (via plugin or code) removes the entire comment system from your site, including the form, existing comments display, and admin menu items.
Yes. Every method described here is reversible. Re-check the Discussion setting, use Bulk Edit to set comments back to “Allow,” deactivate the plugin, or remove the code snippet. Any existing comments you haven’t deleted will reappear.
Wrapping Up
Here’s a quick recap of the main approaches:
- Discussion Settings turns off comments on all future content (Settings → Discussion).
- Bulk Edit disables comments on existing posts and pages in batches.
- Disable Comments plugin removes the entire comment system from your site with one setting.
- Custom code gives developers the same result without adding a plugin.
For most WordPress sites, the simplest path is to change your Discussion Settings for future content and then use Bulk Edit to handle existing posts. If you want a complete, no-traces removal, the Disable Comments plugin is the way to go.
Looking for a clean, professional WordPress theme that works great with or without comments? Browse WPZOOM’s theme collection to find a design that fits your site.



September 10, 2024 7:31 am
The code block for the “How to Turn Off Comments on WordPress Manually” section is messed up. There are no line breaks so it’s unusable if you just want to copy the code into your theme’s function.php file.
September 10, 2024 5:43 pm
Sorry about that. It’s fixed now.