Spam comments flooding your inbox at 3 AM. Irrelevant discussions cluttering your professional portfolio. Comment sections that never get used but still load scripts and slow down your site. If this sounds familiar, you’re not alone — [WordPress comments](/best-wordpress-plugins-top-20-most-popular-choices/) can become more of a liability than an asset for many site owners.
The good news? WordPress gives you multiple ways to disable comments, whether you want to turn them off completely, remove them from specific post types, or clean up existing comment clutter. This guide covers every method, from quick dashboard toggles to code snippets that give you granular control.
What You’ll Need
- WordPress admin access (Administrator role)
- Basic familiarity with the WordPress dashboard
- For advanced methods: Access to your theme’s functions.php file or a code snippets plugin like [[Code Snippets](/best-wpcode-pro-alternatives-7-free-premium-options/)](https://wordpress.org/plugins/code-snippets/)
- 10-15 minutes depending on your chosen method
Method 1: Disable Comments Site-Wide via Settings
The fastest way to stop new comments across your entire site uses WordPress’s built-in discussion settings. This method prevents future comments but leaves existing ones intact.
Navigate to Settings > Discussion in your WordPress dashboard. Uncheck “Allow people to submit comments on new posts.” This single setting prevents WordPress from showing comment forms on any new content you publish.
But here’s the catch — this only affects new posts and pages. Existing content still shows comment forms and accepts submissions. To handle those, scroll down to the same settings page and look for “Allow comments on new posts” under “Other comment settings.” Make sure this is unchecked too.
Save your changes. New posts will now publish without comment functionality, but your existing content needs additional attention.
Best for: Quick prevention of future comments with minimal technical knowledge required.
Method 2: Bulk Edit Existing Posts and Pages
Your existing posts and pages still have commenting enabled individually. WordPress lets you disable comments on multiple pieces of content simultaneously through bulk editing.
Go to Posts > All Posts. Select the checkbox at the top of the post list to choose all posts on the current page, or manually select specific posts you want to modify. From the “Bulk Actions” dropdown, choose “Edit” and click “Apply.”
In the bulk edit panel, find the “Comments” dropdown and select “Do not allow.” Click “Update” to apply this change to all selected posts.
Repeat this process for pages by going to Pages > All Pages and following the same steps. If you have custom post types, you’ll need to visit each post type’s management page and repeat the bulk edit process.
For sites with hundreds of posts, this becomes tedious. You might need to work through multiple pages of content, selecting 20 posts at a time (WordPress’s default pagination limit).
Best for: Sites with moderate amounts of content where you want selective control over which posts lose commenting.
Method 3: Remove Comment Support from Post Types (Code Method)
This method uses a single code snippet to remove comment functionality from entire post types. It’s more efficient than bulk editing and affects both existing and future content.
Install the Code Snippets plugin or access your theme’s functions.php file directly. Add this code:
“`php
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’);
“`
This code loops through all post types on your site and removes comment support from any that currently have it. It affects posts, pages, and custom post types like WooCommerce products.
If you only want to disable comments on specific post types, modify the code:
“`php
function disable_comments_specific_post_types() {
remove_post_type_support(‘post’, ‘comments’);
remove_post_type_support(‘post’, ‘trackbacks’);
remove_post_type_support(‘page’, ‘comments’);
remove_post_type_support(‘page’, ‘trackbacks’);
}
add_action(‘admin_init’, ‘disable_comments_specific_post_types’);
“`
After adding this code, existing posts will no longer show comment forms, and the comment meta boxes disappear from your post editing screens.
Best for: Developers and site owners comfortable with code who want a permanent, comprehensive solution.
Method 4: Hide Comments Completely from Frontend
Removing comment support stops new comments but doesn’t hide existing comments from your site visitors. To completely remove comment-related elements from your site’s frontend, you need additional code.
Add this CSS to your theme’s style.css file or through Appearance > Customize > Additional CSS:
“`css
.comments-area,
.comment-form,
.comment-list,
.comment-respond {
display: none !important;
}
“`
For a more thorough approach that also removes comment-related functionality from the backend, add this PHP code to your functions.php:
“`php
function disable_comments_completely() {
// 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
add_filter(‘comments_array’, ‘__return_empty_array’, 10, 2);
// Remove comments page in admin menu
add_action(‘admin_menu’, function () {
remove_menu_page(‘edit-comments.php’);
});
// Remove comments links from admin bar
add_action(‘init’, function () {
if (is_admin_bar_showing()) {
remove_action(‘admin_bar_menu’, ‘wp_admin_bar_comments_menu’, 60);
}
});
}
add_action(‘init’, ‘disable_comments_completely’);
“`
This comprehensive approach closes all comment functionality, hides existing comments from visitors, and cleans up comment-related admin interface elements.
Best for: Complete comment removal when you’re certain you’ll never want commenting functionality.
Method 5: Use a Plugin for Advanced Control
For non-technical users who want more options than basic settings provide, plugins offer the most flexibility. Disable Comments is the most popular choice, with over 2 million active installations as of 2024 data.
Install Disable Comments from your WordPress plugin directory. After activation, go to Settings > Disable Comments to configure your preferences.
The plugin offers several modes:
Everywhere Disables all comments site-wide Complete removal
On certain post types Selective disabling Mixed content sites
Other settings Custom configuration Advanced users
You can choose to delete existing comments permanently or just hide them. The plugin also removes comment feeds, admin menu items, and dashboard widgets related to comments.
One advantage of using a plugin: easy reversal. If you change your mind about commenting, you can simply deactivate the plugin and restore full functionality.
Best for: Non-technical users who want comprehensive comment management without touching code.
Pro Tips and Common Mistakes
Don’t forget about comment feeds. Even after disabling comments, WordPress might still generate comment RSS feeds at URLs like `yoursite.com/comments/feed/`. The comprehensive code method and plugins handle this automatically, but manual methods might leave these active.
Check your theme’s comment template. Some themes have custom comment display logic that overrides WordPress defaults. If comments still appear after following these steps, you might need to edit your theme’s comments.php file or contact your theme developer.
Consider SEO implications carefully. While comment spam hurts SEO, legitimate user-generated content can boost it. A 2024 study by BrightEdge showed that pages with quality comments averaged 15% better search rankings than identical pages without comments. Weigh this against the moderation burden.
Database cleanup matters for performance. Existing comment data remains in your database even after disabling frontend display. For sites with thousands of spam comments, consider using a plugin like WP-Optimize to clean up this data and reclaim database space.
Plan for contact alternatives. If you’re disabling comments to reduce spam but still want user engagement, set up clear contact forms or social media links. Many users expect some way to communicate with content creators.
FAQ
Will disabling comments affect my SEO rankings?
Disabling comments won’t directly hurt your SEO, but you’ll lose potential user-generated content that search engines value. The impact depends on your typical comment quality — spam comments actually hurt SEO, while thoughtful discussions help.
Can I disable comments on some posts but not others?
Yes. The bulk edit method and plugins let you disable comments selectively. You can also enable/disable comments individually when editing each post in the “Discussion” meta box.
What happens to existing comments when I disable commenting?
Existing comments remain in your database and may still display on your site unless you use the comprehensive code method or a plugin that hides them. Comments aren’t automatically deleted.
Can I re-enable comments later without losing data?
Yes, if you used settings changes or plugins. Your comment data stays in the database. However, if you used code that filters out comments completely, you might need to remove that code first.
Do disabled comments improve site loading speed?
Minimally. Comment forms and existing comments add some page weight, but the performance impact is usually negligible unless you have hundreds of comments per post. The bigger benefit is reduced server load from comment spam attempts.
Clean Up Your WordPress Site Today
Disabling WordPress comments isn’t just about stopping spam — it’s about creating a cleaner, more focused user experience that matches your site’s purpose. Whether you choose the quick settings method for new sites or the comprehensive code approach for established ones, you now have the tools to take control of your comment sections.
Start with Method 1 if you want immediate results, then circle back to clean up existing comments using the bulk edit or plugin approaches. Your future self will thank you for the reduced inbox clutter and cleaner site management experience.
Ready to eliminate comment spam for good? Pick the method that matches your technical comfort level and start implementing it today.
