How to Disable Comments on WordPress

Want to disable comments on your WordPress site? Here’s a quick guide to stop spam, improve site speed, and maintain a cleaner layout. You can:

  • Use WordPress default settings to turn off comments for new or existing posts and media files.
  • Install the Disable Comments plugin for advanced control, including managing comments across multiple sites.
  • Disable comments on specific pages using editor settings or post-type rules.
  • Apply code-based solutions for full customization without plugins.

Each method ensures better security, faster loading times, and easier site management. Keep reading for step-by-step instructions tailored to your needs.

Method 1: Using WordPress Default Settings

WordPress

WordPress includes built-in tools to help you manage comments across your site. Here’s how you can control comments without adding plugins.

Step 1: Turn Off Comments for New Posts

In your WordPress dashboard, go to Settings > Discussion. Under "Default post settings", uncheck the box next to "Allow people to submit comments on new posts". This ensures that any new content you create will have comments disabled by default.

Tip: While you’re in the Discussion settings, you can also disable pingbacks and trackbacks by unchecking "Allow link notifications from other blogs". This can help cut down on spam.

Step 2: Disable Comments on Existing Posts

Disable Comments

For posts you’ve already published, use WordPress’s bulk editing feature to save time:

  • Go to Posts > All Posts in your dashboard.
  • Select the posts you want to edit.
  • From the Bulk Actions dropdown, choose "Edit."
  • Find the "Comments" option, select "Do not allow."
  • Click "Update" to apply the changes.

This approach is especially useful for sites with a lot of existing content.

Step 3: Prevent Comments on Media Files

By default, WordPress allows comments on media attachments, which many users overlook. To stop this:

  • Go to Settings > Discussion.
  • Under "Other comment settings", uncheck "Allow people to post comments on new attachments."
  • Save your changes.

Note: After making these adjustments, double-check by testing new posts, reviewing existing content, uploading media, and monitoring notifications to ensure the settings are applied correctly.

These settings are easy to reverse, so you can enable comments for specific posts or media files later if needed.

Method 2: Comment Control with Plugins

If the default settings in WordPress aren’t enough – especially for multisite networks or more complex rules – plugins can give you detailed control over comments.

Top Plugins for Managing Comments

Feature Disable Comments Others
Multi-Location Management Yes Limited
Existing Comment Removal Yes No
Content Type Filters Yes Yes

Disable Comments stands out for its ability to manage comments across multiple locations and its thorough set of tools for handling comments.

How to Set Up the Disable Comments Plugin

Installing and setting up a plugin like Disable Comments is simple. Follow these steps:

  1. Go to Plugins > Add New in your WordPress dashboard.
  2. Search for "Disable Comments."
  3. Click Install Now, then Activate.
  4. Navigate to Settings > Disable Comments.
  5. Select whether to disable comments "Everywhere" or "On Specific Post Types."
  6. Save your changes.

Pro Tip: After activating the plugin, clear your site’s cache. This ensures all comment-related elements are fully removed from your pages.

Managing Comments Across Multiple Sites

For agencies or teams handling multiple sites, here’s how to manage comment settings efficiently:

  • Use Network Admin controls to apply settings across all sites in the network.
  • Allow individual site owners to make their own adjustments if needed.
  • Automatic cache clearing ensures a consistent look across all sites.

Before making any network-wide updates, back up your database to protect the integrity of your clients’ sites.

This centralized method is different from the next technique, which focuses on adjusting comments for specific pages.

Method 3: Turning Off Comments for Single Pages

Sometimes, you may need to turn off comments on specific pages while leaving them enabled elsewhere. This is especially handy for local service providers who want to keep blog discussions open but prefer to disable comments on service-related pages. WordPress makes this easy to manage.

Adjusting Page Comment Settings

To disable comments on individual pages or posts:

  • Open the page or post in the editor.
  • In the top-right corner, click Screen Options and enable the "Discussion" checkbox.
  • Scroll to the sidebar, find the Discussion section, and uncheck "Allow comments".

Using Post-Type Rules with a Plugin

If you’re using the Disable Comments plugin, you can apply settings based on post types:

  • Navigate to Settings > Disable Comments.
  • Select "On certain post types."
  • Choose the specific post types where you want comments disabled.

For developers, here’s a code snippet to disable comments on all pages:

function disable_comments_on_pages($open, $post_id) {
    $post = get_post($post_id);
    if ($post->post_type == 'page') {
        return false;
    }
    return $open;
}
add_filter('comments_open', 'disable_comments_on_pages', 10, 2);

Important: Only use this code if you’ve already disabled comments site-wide using the earlier methods.

This method allows you to fine-tune your comment settings, keeping engagement where it’s most effective while limiting it elsewhere.

sbb-itb-4893451

Method 4: Code-Based Solutions

For developers who prefer a lightweight approach without relying on plugins, code-based methods offer a way to disable comments while keeping full control over the implementation.

functions.php Modifications

To disable comments across your site and remove related UI elements, add the following code to your theme’s functions.php file:

// Disable support for comments and trackbacks in content 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 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);

// Hide existing comments
function df_disable_comments_hide_existing_comments($comments) {
    $comments = array();
    return $comments;
}
add_filter('comments_array', 'df_disable_comments_hide_existing_comments', 10, 2);

// Remove comments page in menu
function df_disable_comments_admin_menu() {
    remove_menu_page('edit-comments.php');
}
add_action('admin_menu', 'df_disable_comments_admin_menu');

// Redirect users trying to access the comments page
function df_disable_comments_admin_menu_redirect() {
    global $pagenow;
    if ($pagenow === 'edit-comments.php') {
        wp_redirect(admin_url());
        exit;
    }
}
add_action('admin_init', 'df_disable_comments_admin_menu_redirect');

// Remove comments metabox from the dashboard
function df_disable_comments_dashboard() {
    remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
}
add_action('admin_init', 'df_disable_comments_dashboard');

// Remove comments links from the admin bar
function df_disable_comments_admin_bar() {
    if (is_admin_bar_showing()) {
        remove_action('admin_bar_menu', 'wp_admin_bar_comments_menu', 60);
    }
}
add_action('init', 'df_disable_comments_admin_bar');

Using Child Themes Safely

If you’re working with a parent theme, it’s safer to create a child theme to ensure your changes persist through updates. Here’s how:

  1. Add a header to style.css:

    /*
    Theme Name: Parent Theme Child
    Template: parent-theme
    */
    
  2. Enqueue parent theme styles in functions.php:

    function child_theme_enqueue_styles() {
        wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
    }
    add_action('wp_enqueue_scripts', 'child_theme_enqueue_styles');
    
  3. Place the comment-disabling code in the child theme’s functions.php.

This method ensures your customizations remain intact even when the parent theme is updated.

CSS Comment Section Removal

For a quick visual fix, you can hide comment sections using CSS. Add the following code to your theme’s stylesheet:

.comments-area,
#comments,
.comment-respond,
.comment-form {
    display: none !important;
}

Important Notes:

  • This method only hides the comments visually – they still load in the source code.
  • CSS selectors may vary based on your theme.
  • Hidden content can pose SEO risks, so combine this with server-side comment disabling for better results.

"CSS hiding is a quick solution, but it’s generally recommended to use PHP-based methods or plugins for a more comprehensive approach to disabling comments."

Testing Best Practices

Before deploying any changes, follow these steps to ensure everything works smoothly:

  • Use a staging site for testing.
  • Check compatibility across different themes and browsers.
  • Test with various user roles to confirm functionality.
  • Ensure mobile responsiveness.
  • Watch for conflicts with other plugins or custom code.

Impact on Local SEO

Disabling comments can impact your local search visibility in several ways, both positively and negatively. Here’s what you need to know:

Performance Benefits

Removing comments can lead to technical improvements that indirectly boost SEO:

  • Faster Loading Times: Eliminating comment-related database queries speeds up page loading, which is a known ranking factor for search engines.
  • Better Security: Without a comment system, your site is less vulnerable to potential threats.
  • Lower Server Load: Hosting resources are used more efficiently, especially during high-traffic periods.

Key Local SEO Considerations

  • Upsides: Faster load times, reduced risk of spam penalties, and a more efficient crawl budget.
  • Downsides: Loss of user interaction signals and less frequent content updates.
  • Workarounds: Compensate by updating your Google Business Profile (GBP) and using location-based schema markup.

Although Google values quality user-generated content, most local business comments tend to lack depth (e.g., "Great service!") and don’t add much value. Removing them can often make your content more focused and relevant.

To keep your local SEO strong without comments:

  • Use Structured Data: Add local business schema markup to help search engines better understand your site.
  • Focus on Content: Develop location-specific content, like service area guides, to keep your site fresh.
  • Show Social Proof: Include verified customer reviews using schema markup for added credibility.

Next, we’ll guide you on selecting the best strategy for your business needs.

Conclusion: Picking Your Method

To maintain a polished online presence and improve local search rankings, it’s important to choose the right approach for managing comments on your WordPress site. Here’s how to decide based on your needs:

  • For Basic Needs: Stick with WordPress’s built-in settings. This is the fastest and simplest way to disable comments for single-site owners who want a no-fuss solution.
  • For Managing Multiple Sites: The Disable Comments plugin is a great choice. It provides centralized control, making it easier to handle comment settings across a network of sites.
  • For Developers: If you’re looking for full control, modifying the functions.php file allows for complete removal of the comment system. This option is ideal for those with coding expertise.

When making changes, consider how easy it will be to reverse them for temporary campaigns. For high-traffic sites, keep server performance in mind. Testing changes in a staging environment is always a smart move to ensure everything runs smoothly. This approach supports a local SEO strategy that focuses on clean, conversion-friendly content rather than unmanaged user interactions.

FAQs

How do I remove the comment section from a WordPress blog post?

To disable comments on a specific blog post in WordPress:

  • Open the post for editing.
  • In the Document sidebar, locate the Discussion section.
  • Uncheck the box for Allow comments.
  • Click Update to save changes.

For handling multiple posts at once, refer to the bulk editing steps mentioned in Method 1, Step 2.

How do I turn off commenting on WordPress?

To disable comments across your entire WordPress site:

  • Go to Settings > Discussion in your WordPress dashboard.
  • Uncheck the option for Allow people to post comments on new articles.
  • Hit Save Changes.

For advanced control, such as managing comments on specific post types or across a multisite setup, consider using plugins as explained in Method 2. For step-by-step guidance, check out Method 1 or Method 2 in the article.

Related posts

Picture of Jonas

Jonas

About the Author:
Jonas is the Co-Founder of LPagery, a yearlong WordPress enthusiast and expert with over 8 years of WordPress experience.

Table of Contents

Start Bulk Creating Pages in Wordpress
Need to boost your sEO?
Start bulk creating Pages Today with LPagery!
Pro Feature

When to Use This Feature

Use Examples