Why Disable WordPress Comments

Comment spam is a persistent problem for WordPress sites, especially those with significant traffic. Thousands of automated bots daily attempt to post spam links, malware, or misleading advertisements on vulnerable WordPress installations. Even with a robust moderation queue, hundreds of spam comments can slip through daily, consuming administrative time and resources.

Beyond the spam problem, comments sections present security risks ranging from XSS vulnerabilities to SQL injection vectors. For many websites—especially news sites, blogs, and marketing content—comments aren't necessary. Readers consume content, but don't need to provide feedback through a comments form.

Benefits of disabling comments: Eliminate 99% of comment spam, reduce admin moderation workload to zero, improve website security, reduce database size, zero impact on SEO ranking, reduce JavaScript and performance overhead from comment systems.

This guide covers nine complete methods to disable WordPress comments—from global site-wide disabling to advanced spam filtering, Akismet setup, and database cleanup strategies.

Disable Comments Site-Wide — Method 1: Settings > Discussion

The simplest approach is to disable comments across your entire site from the WordPress Admin Dashboard in just 2-3 clicks.

Steps to Disable All Comments

  1. Log into WordPress Admin Dashboard → go to Settings > Discussion
  2. Find the "Default article settings" section
  3. Uncheck the checkbox for Allow people to post comments on new posts
  4. To also disable pingbacks/trackbacks, uncheck Allow link notifications from other blogs (pingbacks and trackbacks)
  5. Scroll down and click Save Changes

Important: This setting applies only to new posts. Existing posts may still have comment forms enabled. To close comments on legacy posts, follow Method 4 below.

Disable Comments Per Post Type — Method 2: functions.php

If you want fine-grained control—for instance, disable comments on Pages but keep them on Posts—use custom code in your theme's functions.php file.

Code to Disable Comments on Pages Only

Go to Appearance > Theme File Editor > functions.php and add this code at the end of the file:

This code disables comments only on pages while preserving comment functionality for regular posts.

Hide Comment Count Display — Method 3: Remove Comment Indicators

Beyond closing the comment form, you should also remove comment count links from blog post listings, since displaying "0 comments" still signals that the comment feature exists.

Remove Comment Count Badge

Add this code to functions.php to hide comment count displays:

This ensures no comment count appears in post archives or single post views.

Disable Pingbacks and Trackbacks — Method 4: Legacy Notifications

Pingbacks and trackbacks are automated notifications sent when external sites link to your posts. These features are outdated and attract massive spam volumes. Disable both.

Steps to Disable Pingback/Trackback

  1. Settings > Discussion
  2. Uncheck Allow link notifications from other blogs (pingbacks and trackbacks)
  3. Click Save Changes

Akismet Anti-Spam Setup — Method 5: If Comments Are Enabled

If your site requires a comment section, Akismet is the industry-standard anti-spam plugin that filters out 99% of comment spam automatically.

Install and Activate Akismet

  1. Go to Plugins > Add New and search for "Akismet Anti-Spam"
  2. Click Install Now → Activate
  3. Go to Settings > Akismet and click "Set up your Akismet account"
  4. Sign up at akismet.com—choose Personal (free) for personal blogs, or Business plan ($4-5/month) for commercial sites
  5. Copy your API key from akismet.com and paste it into WordPress

Licensing note: The free Akismet Personal plan is strictly for non-commercial personal blogs. Commercial websites must upgrade to the Business plan to comply with terms of service.

Configure Comment Moderation Queue — Method 6: Manual Approval

If you want comments visible but reviewed first, enable moderation so every comment requires admin approval before publication.

Enable Moderation Workflow

  1. Settings > Discussion
  2. Under "Before a comment appears," check Comment must be manually approved
  3. Click Save Changes

This setting ensures all new comments enter a queue pending admin review, adding a security layer against malicious content.

Add Honeypot Field — Method 7: Bot Spam Prevention

A honeypot is an invisible form field that looks like a normal input to bots but is hidden from humans via CSS. If the field gets filled, the submission is rejected as bot activity.

Implement Honeypot Protection

Add this code to functions.php to create a honeypot field:

Alternatively, use a plugin like "Honeypot for Comments" which handles the implementation without custom coding.

Bulk Close Comments on Existing Posts — Method 8: Quick Batch Action

If you need to close comments on all existing posts without visiting each one individually, use bulk edit.

Bulk Edit Comment Status

  1. Go to Posts > All Posts and select all posts (check "Select All")
  2. In the Bulk Actions dropdown, select Edit
  3. In Comment Status, choose "Closed"
  4. Click Apply

Delete Spam Comments via WP-CLI — Method 9: Command Line Cleanup

For sites with thousands of accumulated spam comments, WP-CLI allows bulk deletion from the command line in seconds.

Delete All Spam Comments

This command permanently removes all comments marked as spam without requiring admin panel access, saving hours of manual deletion.

Comparison Table — Disable vs. Moderate vs. Filter

Aspect Disabled With Moderation With Akismet
Spam reaching site0Low (reviewed)99% filtered
Admin workloadNoneHigh (approve each)Low (auto-filtered)
User engagementNonePossibleEnabled
Database bloatNo growthAccumulatesAccumulates
SEO impactNoneNoneNone
Security levelHighMediumHigh
CostFreeFree$4-5/month

Conclusion: If comments aren't essential, disable them entirely. If engagement is critical, use Akismet—moderation by hand is time-intensive and impractical at scale.

Complete Comment Disabling Workflow

To fully disable comments with zero remnants, follow these steps in order:

  1. Settings > Discussion → disable comments and pingbacks site-wide
  2. Posts > All Posts → bulk edit to close comments on legacy posts
  3. Comments admin page → delete old comments (optional)
  4. Add code to functions.php to hide comment count displays
  5. Update theme templates to remove comment section markup from single post views

Result: After completing these steps, your site will have zero comment functionality. Spam comments will stop arriving, your database will remain lean, and site performance will improve.

Start with AsiaGB WordPress Hosting — DirectAdmin, One-Click WordPress Install

WordPress hosting fully compatible with comment moderation, Akismet integration, DirectAdmin management, 99% uptime guarantee, and SSD storage for maximum performance.

View Hosting Plans