How to Delete All Comments in WordPress

Comments can easily build up on a WordPress site, especially if you don’t have any anti-spam measures in place. It seems easy enough to get rid of them all, there are tons of plugins for this, but there are some nuances you should be aware of to make sure you’re deleting the right information, and doing a thorough job.

Let’s look at how to clean up this aspect of your WordPress site.

Watch out for these “gotchas”

Commentmeta

Before we get into the “how-to” of it all, we should mention this pesky thing called commentmeta.

Information in your WordPress site is stored in the database, in tables. There is a table called wp_comments, which is pretty much exactly what you think it is – the comments themselves.

However, there is an additional table, wp_commentmeta, which may (depending on specific plugins) store optional, additional data about those comments.

So in order to keep a clean database, when deleting comments any associated meta data for those comments should also be deleted. Otherwise it becomes “orphan data” – data which is no longer attached to anything.

We’ll keep this in mind as we review the various ways to delete comments from your WordPress site.

Unexpected types of comments

The most common type of comment on your site are the ones left on blog posts. These are the ones you see when you go to the Comments type in your WordPress admin. Those have various statuses:

  • Approved
  • Pending
  • Spam
  • Trash

You probably already know that.

What you may not know is that other plugins may use comments for different purposes. For example, WooCommerce uses comments to store order notes:

wp_comments table

This is important if you want to delete blog comments, but retain order notes, or other custom types of comments.

Back up your database first

I would be remiss not to mention that you should take a backup of your database first just in case you delete something unexpectedly. Otherwise the change is permanent and the data lost.

Manual Deletion of All Comments

If you don’t have a huge amount of comments to clean up, let’s say dozens or even a couple hundred, but not thousands, it can be done using the default tools available.

  1. In your WordPress admin, go to Comments
  2. Your screen will likely display 20 comments per page. To display and therefore be able to delete more comments at once, click on Screen Options to display more comments per page.
  3. Check the box next to Author so that all comments on the page are selected
  4. In the Bulk actions dropdown, select Move to Trash, then click Apply
  5. The trash will be automatically cleared by WordPress after 30 days. If you want to delete them instantly, click on the Trash menu and click the Empty Trash button

This method will get rid of the associated comment meta as well and won’t touch other types of comments like WooCommerce Order Notes.

But if you have thousands of comments to remove, this method is going to be very time-consuming.

There are various methods to more easily delete comments in bulk.

Delete All Comments with a Plugin

There are many plugins available which will help you mass delete comments on your site. Generally, they work fine but some have nicer interfaces than others and may do a more thorough job (re: commentmeta).

There are two plugins I would recommend – choose the one which seems best for your scenario.

Recommended for deleting standard blog comments: WP Bulk Delete

WP Bulk Delete can be used to remove any kind of content from your WordPress site, including comments.

After installation it adds its own menu tab which is a bit annoying and unnecessary, but this is the kind of plugin you can use once and then delete after using. You don’t need to keep it once it’s done the job.

To remove comments, go to: WP Bulk Delete → Delete Comments. You will have the following options:

  • Delete comments by status: Pending, Spam, Trash, Approved
  • Delete comments by date: comments older than x days, submitted in a certain timeframe

These options will delete all the selected comments with one click.

There are a couple of premium options like removing comments from specific authors and posts, as well as scheduling options. But for most use-cases, the free version will be enough.

WP Bulk Delete options

Be aware that deleting approved comments will also delete WooCommerce order notes, or other comment types besides blog post comments and there isn’t a way to filter them out.

So this plugin will be best used when it’s only blog post comments that you want to remove. See the second recommendation below if you need more fine-grained control.

Note that pingbacks are also a kind of comment and will be deleted.

How to check if other kinds of comments will be deleted

If you’re not sure if comments are being used in other ways on your site, here’s an easy way to check: compare the number of Approved Comments shown by Bulk Delete, with the number of approved blog posts comments you have. If Bulk Delete shows more Approved Comments than you have post comments, it means comments are being used in another way on your site.

Remove commentmeta

In most cases, deleting the comments as described above, removes only the comments themselves and not the associated commentmeta. This requires another step in WP Bulk Delete:

  1. Go to Delete Meta Fields → Cleanup
  2. Then choose Orphaned Comment Meta

Recommended if you need more control: Disable Comments Plugin

The other plugin I recommend for deleting comments is Disable Comments. It’s primary use, as you can guess by the name, is to turn off commenting ability on your site.

But it also has options to delete comments, with some useful features. If you run a WooCommerce site and want to preserve order notes, or your site uses other kinds of comment types that you don’t want to delete, this is the plugin for you.

It provides the ability to:

  • Delete comments on specific post types (so you can delete comments only for posts, without touching products)
  • Delete specific comment types (you can delete traditional comments without touching other comment types)
  • Delete all Spam comments
  • Delete all comments

Commentmeta is also removed.


I tested multiple plugins for this article and make the above two recommendations based on the user-friendliness of their interfaces, providing the necessary options, and doing a thorough job.

If you have Googled this topic before, you may see other articles recommending others including Delete all comments of website. It is very popular but I can’t recommend it due to the pretty terrible user interface which is loaded with requests to buy the developer a beer. It also does an incomplete job, without providing a way to clean up the commentmeta.

All in all, WP Bulk Delete and Delete Comments both provide a bit more control, with less of an eyesore.


If you are a developer and don’t want to use a plugin to remove comments, there are ways to directly manipulate the database to achieve the same goal.

Delete All Comments in WordPress using PHP MyAdmin

To delete ALL comments regardless of type or status (including WooCommerce order notes or other atypical comments):

  1. Access PHPMyAdmin in your hosting control panel
  2. Click on the database for your site – you will then be presented with a list of all the tables.
  3. Locate the table wp_comments in the list. (wp_ is the default prefix, but might be different if you used a security plugin or similar to change this for your installation).
  4. Click on EMPTY and press OK.
  5. Then you should do the same for the wp_commentmeta table

If you need more fine-grained control over which types of comments to delete, see the next section for specific SQL Commands, or use the WP Bulk Delete plugin.

Delete Comments in WordPress with SQL Commands

If you want to remove a specific subset of comments you can also do this in PHPMyAdmin by running specific SQL commands. This is essentially what a plugin will do for you, but here you’re doing it manually.

This of course has additional risks- if you run the wrong query you might delete something unexpectedly.

To run a specific command on a table:

  1. Click on the wp_comments table from the list on the left
  2. Click the SQL tab at the top of the page.
  3. In the text field, Run SQL query/queries on table, paste the desired command from the list below
  4. If you are unsure about it, you can click Simulate Query first to see how many entries will be affected.
  5. When you’re ready to run it, click Go.

Delete spam comments

DELETE FROM wp_comments WHERE comment_approved = 'spam';
Code language: JavaScript (javascript)

Delete pending comments

DELETE from wp_comments WHERE comment_approved = '0'
Code language: JavaScript (javascript)

Delete approved comments

DELETE from wp_comments WHERE comment_approved = '1'
Code language: JavaScript (javascript)

Delete comments in the trash

DELETE from wp_comments WHERE comment_approved = 'trash'
Code language: JavaScript (javascript)

Delete only comments (and not order_notes or other types)

DELETE from wp_comments WHERE comment_approved = '1' AND comment_type = 'comment'
Code language: JavaScript (javascript)

Delete Comments Using WP-CLI

If you like tightrope walking without a net, and enjoy using command line tools without a GUI (Graphical User Interface), you can use WP-CLI. This is a command line tool specifically for WordPress.

Please see the following resources for the specific details:


So here you have several ways to easily delete comments on your WordPress site in bulk. I hope you find a method that suits you! We also have a separate guide if you would rather disable comments and the “leave a reply” text on your site, without deleting comments.

Weekly WordPress Tips To Your Inbox

  • This field is for validation purposes and should be left unchanged.