Do you want to remove all comments from your WordPress site? It's rare, but sometimes a site owner may decide to remove all comments from their WordPress site. In this article, we will show you how to easily remove all WordPress comments.
There are many legitimate scenarios when a user really needs to remove all WordPress comments without any hesitation.
For example, you filled WordPress with dummy comments on a development site just to see what they would look like. I wish I could remove those comments before moving to a live site.
There are many other scenarios as well, where a site owner would want to get rid of comments from their WordPress site.
However, if you just want to delete spam comments, check out our guide on how to batch delete spam comments in WordPress. If you're bothered by comment spam on your WordPress, be sure to check out these tips and tools to combat WordPress comment spam.
If there are comments appearing on your pages, check out how to disable comments on WordPress pages.
If none of the above scenarios apply, continue reading.
First you need to create a full WordPress backup of your site.
Deleting all comments in WordPress is an irreversible action. You won't be able to undo it once you've deleted those comments. That is why it is important that you have a backup.
The first thing you need to do is install and activate the Remove All Comments plugin. For more details, check out our step-by-step guide on how to install a WordPress plugin.
Upon activation, you need to visit Tools »Clear All Comments page. This is where you will see the total number of comments on your website, a confirmation box, and the delete button.
Clicking the Remove All button will permanently remove all comments from your WordPress site. Including spam and junk.
You can now visit the comments page and you will see all comments safely removed from your WordPress site.
You can also quickly remove all WordPress comments using MySQL or phpMyAdmin. This method is only recommended for more advanced users.
Login to the cPanel control panel of your WordPress hosting account. In the database section, click on phpMyAdmin.
Within phpMyAdmin, you will need to locate your WordPress database. You will see a page like this showing all the WordPress database tables.
Check the box next to wpprefix_comments
and wpprefix_commentmeta
table. The name of the comment tables can vary depending on the table prefix you choose during the WordPress installation.
After selecting the comment table, locate the 'With Selected:' dropdown below the table list and select 'Empty' from the dropdown.
PhpMyAdmin will now show you a warning asking if you really want to empty those tables.
Click the Yes button to continue. This will remove all WordPress comments from your database.
You can also remove all WordPress comments using the MySQL console (command line). Just login to your MySQL console and run this command:
TRUNCATE 'wp_commentmeta'; TRUNCATE 'wp_comments';
That's it, we hope this article helped you learn how to easily delete all comments in WordPress. You may also want to see our list of 24 must-have WordPress plugins for business websites
If you enjoyed this article, please subscribe to our WordPress YouTube Channel video tutorials. You can also find us on Twitter and Facebook.