AI News
  • Home
  • Artificial Intelligence
  • E-commerce
  • News
  • Featured
  • Web World
  • Contact
No Result
View All Result
AI News
  • Home
  • Artificial Intelligence
  • E-commerce
  • News
  • Featured
  • Web World
  • Contact
No Result
View All Result
AI News
No Result
View All Result

How to Disable WordPress Comments: Complete Guide

Paul H by Paul H
April 2, 2026
in WordPress
5 0
0
WordPress dashboard showing comment settings being disabled
8
SHARES
Summarize with ChatGPTShare to Facebook

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

A clean workspace scene showing an open MacBook Pro displaying the WordPress das
  • 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

An elegant overhead shot of a sleek desktop setup showing dual monitors displayi

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:

Mode Effect Best For
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.

Related posts:

Best WPCode Pro Alternatives: 7 Free & Premium Options

CVE-2022-21661: WordPress SQL Injection Vulnerability

Why use WordPress for your Website?

Tags: CommentsPerformanceSite ManagementSpam Preventionwordpress
SummarizeShare3
Paul H

Paul H

An SEO and Content expert having experience working with Enterprise-level corporations as an SEO and Digital Marketing Specialist. Contact me for any type of SEO/SEM, Digital Marketing service- paul@e-commpartners.com

Related Stories

Illustration of a website window with a cracked shield and a hidden second door behind it, representing a WordPress site still compromised after patching

WordPress Patched Itself. Your Store May Still Be Owned

by Paul H
August 2, 2026
0

WordPress force-updated millions of sites against the wp2shell RCE chain. That fixed the hole. It did not remove anyone who was already inside. Here are the checks that...

Python script exporting WooCommerce orders to CSV file

Export WooCommerce Orders to CSV with Python

by Paul H
July 25, 2026
0

Python script to export WooCommerce orders and line items to CSV. Handles nested data, pagination, and Excel-friendly UTF-8 output.

Illustration of a stopwatch merged with a shopping cart racing forward, showing how site speed drives online sales

A 0.1s Speed Boost Lifted Retail Sales 8.4%. Here’s How

by Paul H
July 22, 2026
0

Deloitte measured what one tenth of a second is worth to an online store: 8.4% more conversions. Here are the three metrics to fix first.

Editorial illustration comparing WooCommerce hosting options

WooCommerce Hosting Comparison for Growing Stores

by Paul H
July 22, 2026
0

Growing WooCommerce stores should compare hosts by performance, backups, staging, support, security, traffic limits and renewal pricing.

Recommended

Industrial Artificial Intelligence

NIST Researcher Describes Data Considerations for Industrial Artificial Intelligence

May 26, 2025
Illustration of a website admin dashboard connected to AI neural circuitry, representing WordPress 7.0 AI foundations

WordPress 7.0 Puts AI in Your Dashboard. Now What?

July 19, 2026

Popular Story

  • AI is revolutionizing retail

    The AI Revolution in Retail: Where We Stand Today

    20 shares
    Share 8 Tweet 5
  • Autonomous Deliveries: The Future of eCommerce Logistics and the Rise of Drones and Self-Driving Vehicles

    18 shares
    Share 7 Tweet 5
  • Why use WordPress for your Website?

    17 shares
    Share 7 Tweet 4
  • Top 10 Advanced SEO Techniques & Strategies for 2024

    15 shares
    Share 6 Tweet 4
  • China Opens Car Market after Trump’s action

    14 shares
    Share 6 Tweet 4

E-commerce Partners covers the latest in online retail, AI, and digital shopping trends. We publish news, guides, and analysis to help store owners and marketers stay ahead.

Follow us

Recent Posts

Bar chart of AI impressions next to an empty outline representing missing click data

Your Google AI Impressions Are Live. Clicks Aren’t.

August 2, 2026
Two abstract dashboard panels joined by an arrow, one dissolving into particles, illustrating the Local Services Ads migration into Google Ads

Google Is Erasing Your Local Ads Reports. Export Now

August 2, 2026

Weekly Newsletter

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • Landing Page
  • Buy JNews
  • Support Forum
  • Pre-sale Question
  • Contact Us

© 2026 E-commerce Partners - E-commerce & AI news .