Comments Deletion Plugin
Are you looking for a way to easily delete all comments or one type of comments, unapproved comments for example? This plugin allows you to either delete all comments at once or all comments of one comment category or all comments of more comment categories.
You can also use cPanel and phpMyAdmin to 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.
Follow these steps to delete all WordPress comments using an SQL query:
1. From your cPanel, navigate to the phpMyAdmin.
2. Identify which database you want to modify, then click Enter phpMyAdmin.
3. In phpMyAdmin, click on the wp_comments table.
4. Click on the SQL tab at the top to open the SQL query window.
5. 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'
6. 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.
7. 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:
1. In phpMyAdmin, tick wp_comments and wp_commentmeta’s respective boxes to the left.
2. Scroll down until you locate With selected dropdown menu. Click on it, then choose the Empty option.
3. 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.
If you are not confident with using cPanel to delete comments, you can use our plugin instead. You can download it below.
If you want to use our “Comments Deletion” plugin, use the button to download it, for free.