Massive 4th of July deals on WordPress themes and plugins! Save up to 89% on premium offers.

View Discounts

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
post
coupon
product_page
Filter by Categories
Featured
Page Builders
Plugins
Resources
Services
Themes
WooCommerce

How to Disable Comments in WordPress & Bulk Delete Spam Comments

Written by Editoral Team under Plugins | October 13, 2025 

disable comment banner

Table of Contents

WordPress makes it easy for visitors to share feedback and engage with your content through comments. While this interaction can help build community, not every website benefits from having a comment section. Some site owners prefer to disable comments entirely, especially when spam starts to accumulate.

In this guide, you’ll learn step-by-step how to disable comments and, in turn, stop spam comments on your WordPress site and bulk delete spam comments safely. We’ll also introduce a powerful plugin, Disable Comments – Remove Comments & Stop Spam (Multi-Site Support) by WPDeveloper, which helps you manage comments with just a few clicks.

Why Stop Spam Comments in WordPress?

Comments can be a double-edged sword. On the one hand, they promote discussion and engagement. On the other hand, they can attract spam, consume database resources, and even create security risks.

Here are a few reasons to take control of your comment settings:

  • Reduce Spam: Spambots often flood comment sections with harmful or irrelevant links.
  • Improve Site Performance: Fewer comments mean a lighter database and faster loading time.
  • Enhance Security: Disabling comments can reduce the risk of injection or phishing attacks.
  • Maintain a Clean Look: Not every website (like portfolios or business sites) needs public discussions.

If comments aren’t essential for your website’s goals, disabling them can save time and prevent attracting spam bots.

How to Enable or Disable Comments in WordPress

WordPress gives you complete flexibility over how and where you allow comments, either globally across your site or on individual posts and pages.

1. Disable Comments Globally (For the Whole Website)

If you want to turn off comments everywhere:

  1. Log in to your WordPress Dashboard.
disable comments globally
  1. Navigate to Settings → Discussion.
setting decussion
  1. Uncheck the box “Allow people to submit comments on new posts.”
comment setting image
  1. Click Save Changes.
save button image

This will disable comments on all new posts and pages going forward.

Note: Existing posts won’t be affected. You’ll need to disable comments on them manually or use a plugin.

2. Disable Comments on Individual Posts or Pages

To disable comments on a specific post or page:

  1. Open the post or all posts in the editor.
deshboard image

 2. Click on quick edit.

quick edit image

3.  Uncheck “Allow comments.”

disable comment setting image

4. Click  “update”.

This is ideal when you only want comments turned off on certain pages — like your homepage, contact page, or landing pages.

3. Bulk Disable Comments on Existing Content

If you have multiple existing posts and want to disable comments quickly:

  1. Go to Posts → All Posts (or Pages → All Pages).
deshboard post image
  1. Select the posts you want to edit.
  2. In the Bulk Actions dropdown, choose EditApply.
  3. Under Comments, select Do not allow.
edit exisiting post image
  1. Click Update.

All selected posts will have their comments disabled instantly.

Using a Plugin to Disable Comments

If you manage a large site or want an easier solution, using a plugin is the best choice.
One of the most powerful tools for this purpose is the “Disable Comments – Remove Comments & Stop Spam (Multi-Site Support)” plugin by WPDeveloper.

Why Choose WPDeveloper’s Disable Comments Plugin?

This plugin simplifies comment management while also fighting spam and keeping your database clean.

disable comment plugin image

Key Features:

  • Disable Comments Anywhere: Turn off comments across posts, pages, media, or the entire site.
  • Stop Spam Automatically: Block spam submissions before they hit your moderation queue.
  • Multi-Site Ready: Perfect for users running WordPress Multisite installations.
  • Database Cleanup: Remove old comments, spam, and pending moderation items in one click.
  • User-Friendly Interface: Clean dashboard with intuitive options — no coding needed.

How to Use It:

  1. Go to Plugins → Add New.
deshboard plugin image
  1. Search for “Disable Comments – Remove Comments & Stop Spam.”
  2. Install and activate the plugin by WPDeveloper.
plugin install image
  1. Navigate to Settings → Disable Comments.
disable comment settings image
  1. Choose whether to disable comments globally or selectively.

Once configured, your website will be free from comment forms, links, and spam activity, helping it run faster and more securely.

How to Bulk Delete Spam Comments in WordPress

Even with spam filters in place, unwanted comments can still accumulate. Here are the most effective methods to delete them in bulk.

1. Using the Default WordPress Option

  1. Go to your Dashboard → Comments.
deshboard image
  1. Click on the Spam tab.
spam comment image
  1. Select “Empty Spam” to permanently remove all spam comments.

Tip: WordPress automatically deletes spam older than 15 days, but manual cleanup keeps your database optimised.

2. Automatically Remove Spam Using a Plugin

The Disable Comments – Remove Comments & Stop Spam plugin can also help remove spam automatically. It offers an option to delete unwanted comments in bulk, saving you time and effort.

Alternatively, you can use other anti-spam plugins like Akismet or Antispam Bee alongside it for stronger protection.

3. Delete Spam Comments via Database (Advanced)

If you’re comfortable using phpMyAdmin, you can clear spam comments directly from your database.

Run this SQL command:

DELETE FROM wp_comments WHERE comment_approved = ‘spam’;

Always back up your website and database before performing any manual operations.

Step 1: Find Your Database Name and Table Prefix

  1. Go to your hosting File Manager or connect via FTP.
  2. Open the file wp-config.php from your site’s root folder.
  3. Look for these lines:

    define(‘DB_NAME’, ‘your_database_name’);

      $table_prefix = ‘wp_’;

  • Note down your database name and prefix (wp_ or custom).

Step 2: Backup Your Database

  • Open phpMyAdmin (via cPanel or your hosting panel).
  • Select your WordPress database.
  • Click Export → Quick → Go to download a backup of your database.

Step 3: View Spam Comments (Optional Preview)

In phpMyAdmin → select your database → click SQL tab → run this query:

SELECT comment_ID, comment_post_ID, comment_author, comment_date, comment_content

FROM wp_comments

WHERE comment_approved = ‘spam’

LIMIT 50;

This will show a sample list of spam comments.

Step 4: Count Total Spam Comments

To see how many spam comments exist:

SELECT COUNT(*) AS spam_count FROM wp_comments WHERE comment_approved = ‘spam’;

Step 5: Delete Comment Meta Linked to Spam Comments

To clean up related metadata before deleting the actual comments:

DELETE cm

FROM wp_commentmeta AS cm

JOIN wp_comments AS c ON cm.comment_id = c.comment_ID

WHERE c.comment_approved = ‘spam’;

Step 6: Delete All Spam Comments

Now delete the spam comments from the main table:

DELETE FROM wp_comments WHERE comment_approved = ‘spam’;

Step 7: Remove Orphaned Comment Meta (Optional Cleanup)

To remove leftover meta entries with no matching comment:

DELETE cm

FROM wp_commentmeta AS cm

LEFT JOIN wp_comments AS c ON cm.comment_id = c.comment_ID

WHERE c.comment_ID IS NULL;

Step 8: Verify Deletion

Run this to confirm spam comments are gone:

SELECT COUNT(*) AS spam_count_after FROM wp_comments WHERE comment_approved = ‘spam’;

If the result is 0, your database is now clean. 

(Optional) Delete Spam via WP-CLI (Command Line)

If you have SSH access and WP-CLI installed, you can do it even faster.

  1. Preview spam comments

    wp comment list –status=spam –format=ids
  1. Delete all spam comments.

    wp comment delete $(wp comment list –status=spam –format=ids) –force
  1. For multisite (run per site):

    for id in $(wp site list –field=blog_id); do

  wp –url=$(wp site url $id) comment delete $(wp –url=$(wp site url $id) comment list –status=spam –format=ids) –force

Pro Tips

Use a date filter to delete only older spam:

DELETE FROM wp_comments

WHERE comment_approved = ‘spam’ AND comment_date < ‘2025-09-01’;

  • If anything goes wrong, restore your backup from Step 2.
  • To prevent future spam, install a plugin like
    Disable Comments – Remove Comments & Stop Spam (Multi-Site Support) by WPDeveloper.
    It helps block spam automatically and disable comments globally without touching the database.

Best Practices for Comment Management

  • Enable moderation to review comments before publishing.
  • Limit URLs in comments to prevent link spam.
  • Use reCAPTCHA or hCaptcha on comment forms.
  • Clean your spam folder regularly.
  • Use a reliable plugin like WPDeveloper’s Disable Comments – Remove Comments & Stop Spam for full automation.
  • Stop traffic from bad and spam bots.

Conclusion: While comments can help foster engagement, they’re not essential for every WordPress website. Disabling comments can improve performance, reduce spam, and strengthen site security, especially for business, portfolio, or e-commerce sites. If you want a quick and efficient solution, the Disable Comments – Remove Comments & Stop Spam (Multi-Site Support) plugin by WPDeveloper makes it easy to turn off comments site-wide, stop spam automatically, and keep your website clean and optimised.

Save on your next purchase of premium WordPress plugins.
View Discounts
disable comment banner

How to Disable Comments in WordPress & Bulk Delete Spam Comments

1. Copy the coupon below

2. Go to ‘s website and paste the code at checkout.

Subscribe to WPdiscounts.io

By clicking the subscribe button, you agree to our privacy policy.