Comments are an ever-present part of everyone’s web browsing experience and can be immensely useful in many cases. Allowing users to provide constructive criticism feedback can also be an effective way of improving yourself. Most importantly, you can use them to foster a personal relationship with your visitors and improve user engagement.
As helpful as comments can be, there are also legitimate reasons to not want them for your site. It is unfortunately common for comment sections to be filled with spam and unwanted promotions. As a result, moderating them can often be a headache. Excessive amounts of negativity and flame wars in the comment section are also going to leave your visitors with a poor impression of your content. A simple solution to this is to disable WordPress comments. However, some website owners might also be wondering how to bulk delete comments in WordPress. In this tutorial, we are going to go over two ways of doing so.
The first way is to simply install a plugin which will bulk delete WordPress comments for you. It is quite convenient and simple. If you do not want to add another plugin to your site for a simple task, however, you can use the second method involving phpMyAdmin. phpMyAdmin is a free and open-source software that allows you to manage your WordPress database. Information from your WordPress site such as posts, pages, comments, categories, tags, users, etc is stored in the database. Through phpMyAdmin, you can directly interact with the WordPress database and delete all of your comments without the need for a plugin.
Regardless of the method, the whole process is actually very easy to do. However, it is highly recommended that you backup your website before you go through with this.
1. Bulk Delete WordPress Comments Using a Plugin
We’re going to be using WP Bulk Delete for the purpose of this tutorial. It is a very useful plugin that allows you to easily bulk delete not just comments but posts, pages, users, attachments, etc as well.
First of all, you are going to have to install the plugin into your WordPress site. Go to the Plugins>>Add New page through your admin sidebar and search for the plugin. Once you find it, click on ‘Install Now’ and wait for the plugin to finish installing. Now just click on the ‘Activate’ button.
After this, you will need to navigate to WP Bulk Delete>>Delete Comments through your sidebar. Beside the ‘Comment Status’ section, you can find options to select which comments to specifically delete. Simply check the boxes next to the type of comments you want to be deleted. If you were wondering how to bulk delete spam comments in WordPress, then this is the way. In order to delete all of your comments, just check all four of the boxes.
The plugin also provides you with the option to only delete comments from within a certain date range. Scroll down and you will be able to see the ‘Comment Date’ section. Fill in the ‘Start Date’ and ‘End Date’ fields with the dates you want. Leaving it empty will delete the comments regardless of their date.
Once you’re through, click on the ‘Delete Comments’ button below. It will bring up a dialog box asking you for a confirmation. Click on OK if you really want to proceed. If you check, you will see that all of the comments on your site will have been deleted.
2. Bulk Delete WordPress Comments Using phpMyAdmin
If you don’t want to bother with a plugin, there is also the option to do it through phpMyAdmin. Most web hosting providers have phpMyAdmin in their control panel. To access it, you will first need to log into your control panel then find and open phpMyAdmin.
On the left column, you should be able to see a list of databases. Before doing anything else, you will first need to select the database you’re working with. Clicking on the appropriate one will cause a list of tables to appear.
From here, you will need to find and empty two tables. Remember that the name of these tables will differ depending on your database prefix. These two tables are ‘wpprefix_comments’ and ‘wpprefix_commentmeta’. If you haven’t set a prefix then their names are going to be ‘wp_comments’ and ‘wp_commentmeta’.
Once you’ve found them, select both of them by checking their respective boxes to the left. Now you will need to scroll down and find a drop-down menu that says ‘With Selected’. Click on it and select ‘Empty’ from the list. After this, you’re going to be asked to confirm if you really want to go ahead with this. Just click on ‘Yes’ to delete all the comments from the database.
You’ll see that this causes all of the comments on your site to be irreversibly deleted. As you can see, it is actually quite easy to bulk delete WordPress comments. Either by using a plugin or through phpMyAdmin, you will be able to remove them all in no time.
So this was our short guide on how to bulk delete WordPress comments effortlessly. We hope you found this to be helpful and easy to understand. If you have any questions or feedback, feel free to leave a comment below. If you want to learn more about WordPress, feel free to check out a few more of our tutorials.
- How to Make your WordPress Site Private
- Essential WordPress Security Plugins for 2019
- How to block an IP address in WordPress