How to Delete All Comments from WordPress (Step-by-Step Guide)
20 mins read

How to Delete All Comments from WordPress (Step-by-Step Guide)

Table of Contents

Introduction

Managing a WordPress site involves more than publishing content. One common issue site owners face is dealing with spam, irrelevant, or outdated comments. In many cases, it becomes necessary to delete all comments in WordPress — either to clean up the database, remove spam, or reset your content structure.

Whether you are managing a WooCommerce business or a personal blog, comment moderation is crucial. Too many low-quality comments can slow down your site, clutter your admin panel, and even hurt your SEO. If you’re asking how to bulk delete comments WordPress or remove all comments WordPress site, you’re in the right place.

This guide explains the four safest and most effective methods to delete comments in bulk:

  1. Using the WordPress Admin Dashboard
  2. Using a WordPress Plugin
  3. Using phpMyAdmin
  4. Using MySQL Queries

Each method serves a different level of user — from beginners to developers. Understanding the “why” is crucial before moving on to the “how.”

Why Delete All Comments in WordPress?

Here are the main reasons why you might want to delete all comments in WordPress:

  1. Spam comments slow down your WordPress database performance.
    When spam builds up in large numbers, it overloads your comments table. This increases database size, slows down queries, and affects page load times across the entire site.
  2. Old comments may not match your current content strategy.
    During rebranding or redesign, outdated comments can confuse users. Deleting them ensures your blog or store reflects your new goals and content tone clearly.
  3. If you’re switching to WooCommerce, comments become unnecessary.
    Most online stores don’t need blog comments. Removing them helps streamline the admin panel and keeps the focus on product pages and checkout performance.
  4. Too many comments reduce WordPress admin speed.
    Large comment volumes slow down the admin dashboard. This affects loading times when moderating, updating posts, or managing discussions from the backend.
  5. Large comment tables increase backup and restore time.
    Backups take longer when comments are not cleared. Deleting them reduces storage usage, speeds up backup processes, and makes restoring the site much faster.
  6. Spam comments can contain unsafe or malicious code.
    Hackers often use comment forms to inject malicious scripts or phishing links. Removing all comments helps reduce exposure to security threats and vulnerabilities.
  7. Clean content improves readability and user engagement.
    Clean, comment-free content is more likely to be trusted by visitors. This improves user experience, especially on product pages or blogs with updated editorial standards.
  8. Deleting comments prepares the site for a relaunch.
    If you’re relaunching with new posts or structure, clean comments help. It allows for better organization without distractions from previous interactions or discussions.
  9. Pending comments take time and manual effort to moderate.
    Many sites collect hundreds of pending or unapproved comments. Bulk deletion saves time and removes the need for manual moderation and spam filtering.
  10. Removing spam helps improve SEO and search engine crawling.
    Search engines crawl all content, including comment links. Spammy URLs in comments hurt SEO. Deleting them improves crawl quality and reduces the risk of ranking penalties.

Important Things to Do Before Deleting All WordPress Comments

  1. Option 1: Make a Backup of Your WordPress Database
    Before you delete anything, back up your WordPress database. This protects your comments, posts, and settings. Use tools like phpMyAdmin, WP-DB-Backup, or your hosting panel. If something goes wrong, you may quickly restore the database without impacting the theme files or the overall structure of your website.
  2. Option 2: Make a Backup of Your Entire WordPress Site
    A full-site backup includes your database, themes, plugins, and media files. Use trusted plugins like Jetpack Backup, BlogVault, or UpdraftPlus. Store backups locally or in the cloud for quick recovery.
  3. Identify the Type of Comments You Want to Delete
    Decide what kind of comments you want to remove. WordPress allows filtering spam, trash, pending, and approved comments. Check each type carefully before deleting. This prevents loss of genuine conversations, customer questions, or reviews that may still be useful or relevant to your content.
  4. Disable Comments on Future Posts and Pages
    To prevent future comment clutter, turn off the comment feature. Go to Settings → Discussion and uncheck the commenting option. You can also use plugins like Disable Comments to apply this change globally, across all posts, pages, or even custom post types on your site.
  5. Moderate and Export Comments You Want to Keep
    Before deleting, export any important comments you may need later. Use tools like WP All Export, or WordPress’s built-in exporter under Tools → Export. Save comments in a file for future reference, especially if they include customer feedback, technical support discussions, or testimonial content.
  6. Check Plugin Compatibility Before Bulk Deletion
    Some comment-related plugins might block or interfere with deletion. Review all active plugins such as Jetpack, Akismet, or third-party comment systems. Disable any plugins related to commenting before starting. This ensures a smooth deletion process without conflicts or partial data removal.
  7. Review Comment Metadata Stored in the Database
    WordPress stores extra comment data in the wp_commentmeta table. Just deleting visible comments doesn’t remove this metadata. If you’re using phpMyAdmin or MySQL queries, clear the metadata too. This keeps your database optimized and prevents leftover data from occupying unnecessary space.
  8. Use a Staging Site for Testing Deletion First
    Always test bulk deletions on a staging environment first. This avoids breaking your live website. Many hosting services like Kinsta or WP Engine offer one-click staging setups. Test deletion, check for issues, and then repeat the process safely on the live version of your site.
  9. Monitor Your Site After Comment Deletion for Errors
    Once comments are deleted, test your site for any unexpected issues. Check post pages, comment counts, and admin loading speed. Clear the cache if changes don’t show. Use tools like Query Monitor or WP Debug Log to spot database issues or plugin-related warnings.

How to Delete All Comments from WordPress (Step-by-Step Guide)

If you want to clean up your WordPress site, deleting all comments is a smart first step. This guide shows four simple methods to remove them easily.. Each method is explained with technical steps.

Method :-1

How to Delete All Comments Using the WordPress Dashboard

This method is perfect for beginners. You don’t need any plugin or code. It works best for small websites with a limited number of comments.

Follow each step carefully to delete comments directly from the WordPress dashboard.

  1. Log in to Your WordPress Admin Area

Open your browser and go to your WordPress login page. The default URL is usually yourdomain.com/wp-admin. Enter your username and password, then click the Log In button to access your dashboard.

  1. Go to the Comments Section

Once logged in, look at the left-hand menu. Click on Comments. This opens the comment moderation screen. Here, you’ll see all your site’s comments – approved, pending, spam, and trash.

  1. Choose the Type of Comments You Want to Delete

You can delete all comments or only certain types. Use the tabs at the top: All, Pending, Approved, Spam, and Trash. Click the tab you want to clean. For full cleanup, start with All.

  1. Select Comments in Bulk

At the top of the comment list, click the checkbox to select all visible comments on the page. If there are multiple pages, you’ll need to repeat this for each page.

  1. Use Bulk Action to Move Comments to Trash

After selecting the comments, open the Bulk Actions dropdown menu. Choose Move to Trash, then click the Apply button. The selected comments will now be moved to the trash.

  1. Repeat the Process for All Comment Pages

WordPress shows a limited number of comments per page (usually 20). Use the page navigation below the list to go to the next page. Repeat steps 4 and 5 until all comments are moved to the trash

  1. Empty the Trash to Permanently Delete Comments

Click the Trash tab to view deleted comments. To remove them permanently, click Empty Trash at the top. All comments are removed from your WordPress database as a result.

  1. Optional: Disable Future Comments

To prevent new comments, go to Settings → Discussion. Uncheck the option that allows people to post comments on new articles. Save changes. This will stop new comments from being added in the future.

Method :-2

How to Delete All Comments in WordPress Using phpMyAdmin

If your site has thousands of comments, deleting them manually is slow. With phpMyAdmin, you can delete all comments directly from your WordPress database. This method is fast and works well for large sites.

Follow the steps below carefully. This guide explains how to delete all comments in WordPress using phpMyAdmin.

⚠️ Important: Before utilizing this technique, make sure you have a complete backup of your database and website.

  1. Log in to Your Hosting Control Panel

Go to your hosting account (like cPanel, Plesk, or DirectAdmin). Look for the phpMyAdmin tool under the “Databases” section. Click it to open your database manager.

  1. Open Your WordPress Database

Inside phpMyAdmin, you’ll see a list of databases on the left side. Click on the one that matches your WordPress site. If you’re unsure, check your wp-config.php file to find the correct database name.

  1. Click on the SQL Tab

After opening your database, click the SQL tab at the top menu. This opens a query editor where you can run database commands.

  1. Run the SQL Command to Delete Comments

Copy and paste the following command into the SQL box:

DELETE FROM wp_comments;

DELETE FROM wp_commentmeta;

Then click the Go button to run the query. This will delete all comments and their metadata from your WordPress site.

  1. Use the Correct Table Prefix If Different

If your database uses a custom prefix (not wp_), you must update the table names. For example, if your prefix is abc_, change it to:

DELETE FROM abc_comments;

DELETE FROM abc_commentmeta;

Using the wrong prefix will cause the query to fail or do nothing.

  1. Confirm the Comments Are Deleted

Go back to your WordPress admin panel. Click on Comments from the sidebar. You should now see “No comments found.” The comment section is now clean and empty.

  1. Clear Caching Plugins or Server Cache

If comments still appear on your site, it may be cached content. Clear your WordPress caching plugin or server cache to see the updated results instantly.

  1. Done! Your WordPress Comments Are Now Removed

You’ve successfully deleted all WordPress comments using phpMyAdmin. This method is fast, especially for bulk removal, and doesn’t require any plugins.

Method :-3

How to Delete All Comments Using a WordPress Plugin (No Code Needed)

If you’re not comfortable with coding or database tools, using a plugin is the easiest way to delete all comments in WordPress. It’s quick, safe, and beginner-friendly. Plugins let you bulk delete comments in just a few clicks — no technical skills needed.

Here’s a step-by-step guide on how to delete all comments using a WordPress plugin.

  1. Log in to Your WordPress Admin Panel

Go to your WordPress login page (usually yourdomain.com/wp-admin). Enter your admin username and password. After login, you’ll land on the dashboard.

  1. Go to Plugins → Add New

In the left-hand menu, click Plugins, then click Add New. You’ll now see the WordPress Plugin Directory where you can search and install plugins.

  1. Search for a Comment Deletion Plugin

In the search bar, type one of the following trusted plugin names:

  • WP Bulk Delete – Active plugin for bulk content removal
  • Delete All Comments of WordPress – Simple one-click deletion
  • Disable Comments – For turning off and cleaning comment sections

These plugins are actively maintained, compatible with the latest WordPress version, and widely used by WordPress users.

  1. Install and Activate the Plugin

Click Install Now next to your chosen plugin. Once installed, click Activate. The plugin will now appear in your WordPress dashboard menu.

  1. Access the Plugin Settings

Each plugin adds a new section to your dashboard. For example:

  • WP Bulk Delete appears under the Tools or Settings tab
  • Delete All Comments may appear directly as a top-level menu item

Click on the plugin’s name to access its settings page.

  1. Choose What to Delete

Select the type of comments you want to delete:

Ad Banner
  • All comments
  • Only pending comments
  • Only spam or trashed comments
  • Comments within a date range (optional in some plugins)

Make sure to read the plugin options carefully before confirming.

  1. Run the Delete Action

Click the Delete or Bulk Delete button to start the process. Depending on your comment volume, this may take a few seconds. You’ll get a confirmation once the deletion is complete.

  1. Check the Comments Section

After deletion, go back to the Comments tab in your WordPress dashboard. You should see “No comments found” or a reduced count, depending on what you deleted.

  1. Optional: Disable Future Comments

To prevent new comments, go to Settings → Discussion. Uncheck the box that allows people to post comments on articles. You can also use the Disable Comments plugin to turn off commenting site-wide.

Method :-4

How to Delete All WordPress Comments Using MySQL Queries (Advanced Method)

If you’re managing a large WordPress site or working on a server directly, you can use MySQL queries to quickly delete all comments in WordPress. This method is fast and powerful but should be used with caution. It’s best suited for developers or advanced users.

⚠️ Important: Always create a full backup of your database before running SQL commands. One wrong query can delete important data permanently.

Follow these step-by-step instructions carefully.

  1. Connect to Your Server via SSH

Use an SSH client like Terminal (Mac/Linux) or PuTTY (Windows).
Login using your hosting credentials:

ssh username@yourserver.com

Once connected, you’re ready to access your database.

  1. Log In to MySQL or MariaDB

Enter the MySQL command-line tool by typing:

mysql -u your_db_username -p

Then, enter your database password when prompted. You should now see the MySQL prompt: mysql>

  1. Select Your WordPress Database

You need to select the correct database that your site is using:

USE your_database_name;

Replace your_database_name with the actual name.

You can find it in your wp-config.php file under DB_NAME.

  1. Run SQL Queries to Delete Comments

Once inside the right database, run these two queries:

DELETE FROM wp_comments;

DELETE FROM wp_commentmeta;

These commands will delete all WordPress comments and related metadata.

They clean both the comments and commentmeta tables completely.

  1. Check for Custom Table Prefixes

If your site uses a custom table prefix (not wp_), update the queries.
For example, if your prefix is blog_, change the query to:

DELETE FROM blog_comments;

DELETE FROM blog_commentmeta;

Using the wrong prefix will result in an error or no change.

  1. Exit MySQL and Close SSH Connection

Once the commands run successfully, exit MySQL:

Exit;

  1. Confirm Changes from WordPress Dashboard

Login to your WordPress admin panel.
Go to Comments from the sidebar.
You should see “No comments found.” All comments are now deleted.

  1. Clear Cache If Comments Still Appear

Sometimes cached data shows old content. Clear your site’s cache using your caching plugin or hosting cache tools. Also clear your browser cache to see the updated site.

Best Way to Prevent Comments from Appearing in WordPress in Future

If you no longer want users to leave comments on your website, WordPress gives you multiple built-in options. You can disable comments globally, on specific posts, or even by using plugins.

Here are the best and most updated ways to prevent future comments in WordPress,

  1. Turn Off Comments for All New Posts in Settings

Go to Settings → Discussion in your WordPress dashboard. Uncheck “Allow people to submit comments” to disable comments on all future posts automatically.

  1. Disable Comments on Existing Posts and Pages

Edit posts or pages in bulk. Under “Quick Edit,” uncheck “Allow Comments.” This removes the comment section from current content without affecting the entire site structure.

  1. Use the Disable Comments Plugin 

Install and activate the Disable Comments plugin. It lets you remove comment features from posts, pages, media, or across the entire site — with just a few clicks.

  1. Disable Comments for Custom Post Types

Some themes or plugins add custom post types. Use a plugin or code to disable comments on products, portfolios, or other types that don’t need user interaction.

  1. Remove the Comment Form from Your Theme (Advanced)

If you’re using a custom theme, remove or hide the comment form in the theme files. This requires editing comments.php or using display conditions in your theme builder.

  1. Disable User Registration to Reduce Spam Comments

Go to Settings → General and uncheck “Anyone can register.” This stops bots and fake users from leaving spam comments through user-generated content areas.

  1. Close Comments After a Set Time Period

In Settings → Discussion, enable the option to automatically close comments on posts older than a set number of days. This helps reduce old post spam or outdated discussions.

  1. Use a Maintenance or Static Page for Your Site

If you don’t need a blog or updates, set a static homepage under Settings → Reading. This keeps your site clean and avoids comment sections from appearing on posts.

  1. Test on a Staging Site Before Applying Site-Wide

Use your host’s staging feature to test comment settings. This prevents mistakes on your live site and helps confirm that comments are fully disabled across all post types.

Conclusion

Managing comments in WordPress is critical for site performance, security, and SEO. Whether you’re clearing spam, improving speed, or preparing for a relaunch, deleting unwanted comments can greatly simplify your site management. This guide explained four effective methods — using the dashboard, a plugin, phpMyAdmin, and MySQL queries — each suited to different user levels. We also covered how to prevent future comments from appearing. Always remember to back up your site before making changes. Choose the method that fits your needs and take control of your WordPress comment system with confidence and clarity.

Leave a Reply

Your email address will not be published. Required fields are marked *

Leave a Reply

Your email address will not be published. Required fields are marked *