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 comments might take over your commenting section in the absence of an anti-spam setup.
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:
- They can cause immense harm to your website’s user experience.
- 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
- Login to your WordPress admin dashboard. Go to the comments section.
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.
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.
- Login to your WordPress admin dashboard. Go to the WP Bulk Delete -> Delete Comments section.
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:
- Running an SQL query
- 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:
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.
This method lets you delete all comments unconditionally in one go.
- Open your hosting cPanel. Go to Database Tools. Select phpMyAdmin.
2. Select the database you want to modify. Scroll down. Select
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)
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.