Do you want to delete all comments from your WordPress site, but don’t have the time to do it one at a time? Not to worry, this article will explain how to delete all comments on WordPress in bulk using three different methods.
Feel free to check them out to see which one is most suitable for your needs.
Reasons to Delete Comments
Comments are a great way to build a strong relationship with your audience. However, there are times when you need to remove all comments from your WordPress site.
For example, you want to get rid of spam due to the lack of anti-spam setup. Or maybe you create dummy comments for testing purposes that serve no purpose once the trial is done.
These types of comments will harm your user experience and your site’s SEO. In those cases, you need to delete all WordPress comments as soon as possible, to prevent any issues.
How to Delete All Comments On WordPress?
There are three alternative ways to delete all comments on WordPress. Check out the tutorials below to help you decide which one best suits your preferences.
Use the WordPress Admin Dashboard
WordPress has a way to delete all comments quickly. You can access this feature from your admin dashboard — the Comment menu, to be exact.
- Login to your WordPress admin dashboard, and then navigate to the Comments section.
- On the Bulk Actions dropdown menu, choose the Move to Trash option. Select all comments, then click Apply.
Use a WordPress plugin
WP Bulk Delete is one of the best plugins that will help you to delete all WordPress comments. It enables you to remove various types of data in bulk, including but not limited to comments. The best part is that you can implement filters and conditions based on your needs.
If you only need the basic features of a comment remover tool, the free version will do just fine. Should you need more filter options, you can upgrade to the Pro version for $29.00 per site.
First, you need to install the WP Bulk Delete plugin. You can check out this article for a quick tutorial.
Once you’ve installed WP Bulk Delete, follow these steps to delete all WordPress comments:
- From your WordPress admin dashboard, navigate to the WP Bulk Delete -> Delete Comments section.
- Check the filters that you want to use. If you use the free version, you can filter the comments based on their status and publication date. Then, click Delete Comments.
You can delete all WordPress comments directly from your database through phpMyAdmin. Despite so, this method requires knowledge about database and SQL. If you’re not familiar with it, you might want to reconsider using the previous methods instead.
phpMyAdmin offers two options to delete comments from your site — running an SQL query or emptying the comment table. Either way, you’re going to modify two tables where comments usually take place: wp_comments and wp_commentmeta.
Note: the tables’ names might differ depending on your database prefix.
Your database is accessible from your web hosting control panel. In this tutorial, we will show you how to access it from Hostinger’s hPanel.
Follow these steps to delete all WordPress comments using an SQL query:
- From your Hostinger hPanel, navigate to the phpMyAdmin.
- Identify which database you want to modify, then click Enter phpMyAdmin.
- In phpMyAdmin, click on the wp_comments table.
- Click on the SQL tab at the top to open the SQL query window.
- Choose one of the following queries to delete comments based on particular conditions:
Delete all WordPress non-approved and pending comments:
DELETE from wp_comments WHERE comment_approved = '0'
Delete all WordPress approved comments:
DELETE from wp_comments WHERE comment_approved = '1'
Delete all WordPress trash comments:
DELETE from wp_comments WHERE comment_approved = 'trash'
Delete all WordPress spam comments:
DELETE from wp_comments WHERE comment_approved = 'spam'
- Add the chosen query to the SQL query window, then click Go. Repeat this step several times according to the number of queries you want to execute.
- Repeat the entire steps to remove comments from the wp_commentmeta table.
If you want to delete all WordPress comments unconditionally, you can follow these steps:
- In phpMyAdmin, tick wp_comments and wp_commentmeta’s respective boxes to the left.
- Scroll down until you locate With selected dropdown menu. Click on it, then choose the Empty option.
- Click Yes to confirm that you want to execute the presented queries.
Here you have it! This way, you can quickly delete all WordPress comments.
While comments play an essential role in growing your site, there are times when you need to purge them from the site. The types of comments you’d want to remove are the ones that can harm the site’s SEO and user experience.
Here are three alternative ways to delete comments in bulk on WordPress:
- Using the WordPress admin dashboard — the easiest way to do the job, but has limited options for filtering the comments.
- Using WP Bulk Delete plugin — offers more flexibility in filtering the comments, but advanced filtering requires the Pro version of the plugin.
- Using SQL queries in phpMyAdmin — provides total control over the deletion process, but requires technical knowledge.
As each method has its pros and cons, it’s best to consider your needs first before making the decision. You can also do a test run on a couple of WordPress comments first to see which method best suits your preferences.