Deleting All Comments on WordPress in Bulk (Three Methods)

For any website to thrive, it should have an increasing number of visitors who actively interact with it. Among the many ways in which users interact with a website’s content, the comments section is a tried and tested method that allows users direct communication with the website. Commenting proves to be an efficient tool that helps you build a strong relationship with your website’s users. In this post, we illustrate the three methods that can be utilized in deleting all comments on WordPress.

Why Would You delete Comments?

Spam

Spam comments might take over your commenting section in the absence of an anti-spam setup.

Dummy Comments

You might have created dummy comments for testing purposes. However, they will no longer be required as you finish the trial.

The fact that you get rid of comments mentioned above is imperative for two main reasons:

  1. They can cause immense harm to your website’s user experience.
  2. They can ruin all your SEO hard work.

Therefore, these types of comments demand removal as soon as possible.

While the urgent need to delete all those comments from your WordPress website persists, where do you find the time to sit in front of your computer and delete them one by one? It is no piece of cake. It is clear that to wordpress delete all comments is a procedural task that needs to be considered from an overall perspective.

Or, is it?

It is, if you keep scrolling to find three methods that will let you delete all comments on WordPress with just one-click!

Deleting all Comments on WordPress in Bulk

1. Using the WordPress Admin Dashboard

  1. Login to your WordPress admin dashboard. Go to the comments section.
Going to comments section in the WordPress dashboard
WordPress Admin Dashboard

2. Select all comments (tick in the left side) and click the Bulk Actions dropdown menu. Choose the Move to Trash option. Select all comments, click Apply.

Moving all comments to the trash
Moving to Trash

2. Using a WordPress Plugin (WP Bulk Delete)

One of the best plugins out there that serves our purpose is WP Bulk Delete. With this plugin, you can remove numerous types of data in bulk, including but not limited to comments. What’s more, the plugin lets you set filters as well as conditions according to your needs, making the process even better!

The plugin comes in two different versions: the Free and the Pro versions ($29.00 per site). The Free version will just be fine should you be looking for the basic features to be able to remove comments. However, in the event that you require advanced filter options, the Pro version is what you need to go for.

So, let’s get down to business.

Make sure you have the plugin WP Bulk Delete installed, in order to proceed to the next few steps.

  1. Login to your WordPress admin dashboard. Go to the WP Bulk Delete -> Delete Comments section.
Go to WP Bulk Delete -> Delete Comments

2. If there are any filters you wish to apply, check them. In the free version, it lets you filter comments according to status and publication date. Finally, click Delete Comments to delete all the comments.

3. Using phpMyAdmin

This method allows you to delete WordPress comments in bulk directly from your database.

Anyway, this method is for the IT savvy users as it requires you to know about databases and SQL. Therefore, in the event that you find yourself familiar with neither of the above, it is advisable to stick to the first two methods introduced in the article.

phpMyAdmin comes with two options to delete comments:

  1. Running an SQL query
  2. Emptying the comment table

In both the above options, what you will do is to modify two tables – wp_comments and wp_commentmeta – where comments usually take place.

(Some databases may have prefixes added to those name. Ex: my_website_wp_comments)

Running an SQL Query

This method lets you mass delete all comments based on the conditions you assign.

Run the following queries based on your requirements.

(If your database prefix is not the default one – wp_ – then replace the wp_ prefix used in the following queries with yours)

1. To remove NON-APPROVED or ALL PENDING COMMENTS

DELETE from wp_comments WHERE comment_approved = '0'

2. To remove ALL APPROVED COMMENTS

DELETE from wp_comments WHERE comment_approved = '1'

3. To completely remove ALL TRASH COMMENTS

DELETE from wp_comments WHERE comment_approved = 'trash'

4. To remove ALL SPAM COMMENTS

DELETE from wp_comments WHERE comment_approved = 'spam'

Note that WP Bulk Delete plugin does the same thing under the hood. All of these actions are irreversible.

Using phpMyAdmin

This method lets you delete all comments unconditionally in one go.

  1. Open your hosting cPanel. Go to Database Tools. Select phpMyAdmin.
Choosing phpMyAdmin in the cPanel
phpMyAdmin

2. Select the database you want to modify. Scroll down. Select wp_commentmeta and wp_comments.

Go to phpMyAdmin and select tables
Select and Empty tables

3. To delete all comments, right click on wp_comments table, then select Empty, and click Yes. (Choosing “enable foreign key checks isn’t important)

Confirm table deletion
Click Yes

Conclusion

The commenting section plays a significant role in maintaining an active and strong relationship with your website users, thereby ensuring your website’s fast and healthy growth.

However, situations such as an avalanche of spam comments can ruin a smooth user experience as well as your SEO work, requiring you to delete them as soon as possible. Since no one has the time to delete hundreds of comments one by one, being knowledgeable about methods that let you mass delete comments is imperative.

In this article, we introduced to you three different ways to deleting all comments on WordPress: using the WordPress admin dashboard; using WP Bulk Delete plugin; and, using SQL queries in phpMyAdmin. Depending on your requirements and demands, you can choose the method that best suits your work.

Finally, if you are dealing with lot of spam on your WordPress site and find it hard to moderate comments manually, you can switch to Hyvor Talk. It has automated spam detection, a better UI, and many features that you can use to grow your audience on your blog. If you have any questions, feel free to leave a comment below.

Need a privacy-focused commenting platform for your website?