◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Post → Disable Comments
How to disable WordPress comments site-wide or selectively
Managing comments on your WordPress site plays a crucial role in shaping the user experience and engagement. Whether you aim to foster discussions or maintain a quieter space, disabling comments can streamline your site’s functionality.
Let’s explore various methods to disable WordPress comments, both selectively and site-wide. From removing comments on all posts to disabling them on specific pages or media, you’ll find clear instructions here to tailor your site’s commenting system to your needs.
Get fast, reliable hosting for WordPress
Power your site with the industry’s fastest, most optimized WordPress hosting
Why disable WordPress comments?
Disabling comments can be strategic for several reasons:
- Time and effort: Managing comments requires significant administrative effort, including moderating discussions and addressing spam.
- Site integrity: Spam comments can clutter posts and diminish user experience. Disabling comments enhances site aesthetics and credibility.
- Focus engagement on other channels: Shifting focus to engagement avenues like email newsletters or social media allows for more controlled discussions.
- Content relevance: For time-sensitive or interaction-independent content, disabling comments helps maintain the intended message.
Disabling comments can be strategic for several reasons:
How to moderate comments without disabling them
If you’d rather leave comments on but keep spam out, WordPress gives you several easy moderation tools.
- Go to Settings > Discussion in your WordPress dashboard.
- Under Before a comment appears, check Comment must be manually approved.
- Add common spam phrases to the Disallowed comment keys box to blacklist them.
- Install an anti-spam plugin like Akismet to automatically filter and flag junk comments.
Smart moderation keeps real conversations flowing while locking spam firmly outside the door.
How to turn off commenting in WordPress
To disable comments site-wide, access your WordPress dashboard, select ‘Settings,’ then ‘Discussion.’ Uncheck the box that allows people to post comments on new articles. For existing posts, edit each post individually and uncheck the ‘Allow comments’ option in the ‘Discussion’ section.
Using a plugin can also bulk edit comment settings for multiple posts at once.
How to disable and remove WordPress comments completely (site-wide)
To remove the distraction of comments entirely, follow these steps:
- Log in to your WordPress dashboard: Access your admin area via yoursite.com/wp-admin and enter your credentials.
- Go to settings: In the left menu, click on ‘Settings’ to expand the options.
- Select discussion: Click on ‘Discussion’ in the Settings menu to control how comments are handled.
- Uncheck the comment options: Uncheck the box that says “Allow people to post comments on new articles” to prevent comments on new posts.
- Disable comments on existing posts: Go to ‘Posts,’ select ‘All Posts,’ and use the bulk actions dropdown to edit selected posts. Change the comments status to ‘Do not allow’ and apply.
- Save your changes: Click ‘Save Changes’ at the bottom of the Discussion settings page to apply your new settings.
How to disable comments on a specific post or page
To selectively disable comments:
- Log in to your WordPress dashboard and navigate to ‘Posts’ or ‘Pages’ from the left-hand menu. Click on the title of the desired item.
- In the post or page editing screen, locate the ‘Discussion’ box. If it’s not visible, click on ‘Screen Options’ at the top right and ensure ‘Discussion’ is checked.
- In the ‘Discussion’ box, uncheck the ‘Allow comments’ option to disable comments for that post or page.
- Click ‘Update’ or ‘Publish’ to save your changes.
How to disable comments on future posts
To disable comments on future posts:
- Log in to your WordPress dashboard with administrative access.
- Navigate to ‘Settings’ on the left sidebar and click on ‘Discussion.’
- Uncheck the ‘Allow people to submit comments on new posts’ box to disable comments on future posts.
- Click ‘Save Changes’ at the bottom of the page to apply the new settings.
- For existing posts, edit each post individually and uncheck the ‘Allow Comments’ option.
How to disable comments on all existing pages or posts
To disable comments on all existing pages or posts:
- Log into your WordPress admin dashboard and navigate to ‘Posts’ or ‘Pages.’
- Select the posts or pages you want to edit by checking the boxes next to their titles.
- From the ‘Bulk Actions’ dropdown menu, select ‘Edit’ and click ‘Apply’ to bring up the bulk edit menu.
- In the bulk edit options, find the ‘Comments’ section and select ‘Do not allow’ to disable comments.
- Click ‘Update’ to save your changes.
To change the default settings for future posts, go to ‘Settings’ then ‘Discussion’ in your dashboard and uncheck the box that allows comments on new posts.
How to delete all existing WordPress comments
Deleting all comments from your site can be necessary for various reasons. Follow these steps:
- Log in to Your WordPress Dashboard: Access your admin panel via yoursite.com/wp-admin and enter your credentials.
- Go to the Comments Section: Click on ‘Comments’ in the left-hand menu.
- Select All Comments: Use the checkbox at the top of the comments page to select all comments. Adjust the number of items displayed per page in the Screen Options if needed.
- Bulk Actions: Choose ‘Move to Trash’ from the ‘Bulk Actions’ dropdown menu and click ‘Apply.’
- Empty the Trash: Navigate to the ‘Trash’ link above the comments list and click ‘Empty Trash’ to delete all comments permanently.
Once you empty the trash, all comments will be permanently deleted. Ensure you want to delete all comments before proceeding.
How to remove the ‘Comments are closed’ message
Even after you disable comments, some themes still print a “Comments are closed” notice under every post. Here’s how to hide it for good.
- Connect to your WordPress site using FTP or your hosting file manager.
- Navigate to your active theme folder (/wp-content/themes/your-theme).
- Open the comments.php file.
- Locate the line (or block) that echoes “Comments are closed.”
- Comment out that code section or delete it entirely.
- Save the file, then upload it back to the server.
If you’d rather not edit core theme files directly, work inside a child theme or enlist a developer to keep updates hassle-free.
How to disable comments on media
WordPress automatically creates an “attachment page” for every file you upload, and that page can collect comments just like a blog post. Most site owners never link to, let alone moderate, these pages, which makes them a magnet for spam. Turning off comments on media keeps these hidden corners clean and saves you hours of unwanted moderation.
Why media items attract spam
- Media attachment pages are publicly accessible, even if you never link to them.
- These pages often slip past routine moderation, so spam lingers unchecked.
- Automated bots specifically look for unprotected attachments because they know many sites ignore them.
Step-by-step: turn off comments on media files
- on ‘Media’ to open your Media Library.
- Edit Media Settings: Select the media item you want to edit. In the attachment details, scroll to the ‘Discussion’ section. If it’s not visible, click ‘Screen Options’ at the top right and check ‘Discussion.’
- Disable Comments: Uncheck the ‘Allow comments’ box in the ‘Discussion’ section.
- Update the Media Item: Click the ‘Update’ button at the top to save your changes.
- Repeat as Necessary: Repeat these steps for each media item individually or use a plugin for a site-wide solution.
Once you save your changes, all comment forms should vanish from your media pages, closing a back door that spammers love to exploit.
How to use a plugin to disable comments
Using a plugin can be an efficient way to disable comments. Here are a few recommended plugins:
- Disable Comments: Easily disable comments site-wide or on specific post types with a simple toggle interface.
- WPDiscuz: Offers options to disable comments site-wide or for individual posts and pages, while adding a modern commenting system.
- Disable Comments for Any Post Types: Allows fully disabling or hiding comments for any post types, pages or attachments.
Let’s take a look at how to use the Disable Comments plugin. It is one of the top go-to options, trusted by more than one million active WordPress sites.
- Install the plugin from Plugins › Add new, search for “Disable Comments,” click Install now, then Activate.
- Head to Settings › Disable Comments.
- Pick Everywhere to shut off comments site-wide, or choose On certain post types for finer control.
- If you select On certain post types, tick Posts, Pages, Media, or any custom post type you want to quiet.
- Click Save changes.
The plugin will hide existing comments, remove comment forms, and clear out comment-related menus and widgets for a cleaner dashboard.
The other plugins have similar settings as well, and any of these tools gives you an easy, reversible way to keep conversations under control without touching your theme files.
How to disable comments using code
If you’re comfortable poking around under the hood, you can shut off comments across your entire site with a short, safe code snippet—no plugin required. Here’s the quick-start guide.
- Connect to your site files. Use FTP or your hosting control panel’s file manager to access WordPress core files.
- Open your active theme folder. Head to /wp-content/themes/your-theme-name/ and locate functions.php.
- Paste the snippet below at the very end of the file, then save.
- Refresh your site. Comments and trackbacks will now be disabled everywhere—past, present, and future.
// Disable comments on all post types
function df_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', 'df_disable_comments_post_types_support');
// Close comments and pings on the front-end
function df_disable_comments_status() {
return false;
}
add_filter('comments_open', 'df_disable_comments_status', 20, 2);
add_filter('pings_open', 'df_disable_comments_status', 20, 2);
Why this works: The first function removes comment and trackback support from every registered post type, while the second function forces WordPress to treat all comment and ping requests as closed on the front end. This lightweight solution keeps your site lean and eliminates one more plugin to maintain, yet you can roll back at any time by deleting the snippet.
Disable comments on your WordPress site today
Managing comments effectively is key to maintaining a professional, spam-free WordPress site. Whether you’re disabling comments to reduce moderation workload, prevent off-topic discussions, or streamline your site’s appearance, having control over where and how comments appear is essential.
To get started, decide whether you want to turn off comments globally or just on specific post types—then head to Settings > Discussion in your WordPress dashboard to make your first changes.
When you’re ready for professional hosting, Liquid Web can help. Our WordPress hosting options configure business-class servers and support plans specifically for WordPress websites.
Click through below to explore all of our WordPress hosting options, or chat with a WordPress expert right now to get answers and advice.
Additional resources
What is WordPress? →
A complete beginner’s guide to WordPress.org
7 best WordPress slider plugins →
Find the best WordPress slider plugins to enhance your website with stunning, responsive image sliders.
Beginner’s Guide to WordPress themes →
Learn how they work, what to look for, how to choose, and more
Wesley Whetten is the former Sr. Affiliate Program Manager at Liquid Web, SolidWP, and Nexcess. For almost five years, Welsey has worked tirelessly to help others understand the power of affiliate marketing and how to use it to generate new revenue streams.