Do you want to delete all comments from your WordPress site?
It is rare, but on some occasions, a site owner may decide to delete all the comments from their WordPress site. If you have a lot of comments then this could take some time to delete them manually.
In this article, we will show you how to easily bulk delete all WordPress comments.
Before you Delete All WordPress Comments
There are many legitimate scenarios when a user really needs to delete all WordPress comments without any hesitation.
For example, you filled WordPress with dummy comments on a development site just to see how they would look. You would want to delete 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 the comments from their WordPress site.
However, if you just want to delete the spam comments, then take a look at our guide on how to batch delete spam comments in WordPress. If you are upset about comment spam on your WordPress, then make sure you check these tips and tools to combat comment spam in WordPress.
If there are comments showing up on your pages, then take a look at how to disable comments on pages in WordPress.
If none of the above scenarios apply, then continue reading.
First you need to create a complete WordPress backup of your site.
Deleting all comments in WordPress is an irreversible action. You will not be able to undo it once you have deleted those comments. This is why it is important that you have a backup.
Method 1: Deleting All WordPress Comments Using Plugin
The easiest way to delete all WordPress comments at once is by using a plugin.
Note: This action is irreversible and you need to make a complete WordPress backup before moving forward. This will allow you to restore comments if you change your mind.
The first thing you need to do is install and activate the Delete All Comments of WordPress plugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon activation, you need to visit Tools » Delete Comments page. This is where you will see the total number of comments on your website and options to delete comments.
You can choose to delete all WordPress comments, pending comments, spam comments, or comments already in trash.
If you want to delete all WordPress comments, then select ‘All Comments’ option and then click on the Delete Now button.
The plugin will now permanently delete all comments from your WordPress site. Including those in spam and trash.
You can now visit the comments page, and you will see all comments safely deleted from your WordPress site.
Method 2: Delete All WordPress Comments Using phpMyAdmin
You can also quickly delete all WordPress comments using MySQL or phpMyAdmin. This method is only recommended for more advanced users.
Note: This action is irreversible too. You need to make a complete WordPress backup or at least make a WordPress database backup before moving forward.
Login to cPanel dashboard of your WordPress hosting account. Under the database section, click on phpMyAdmin.
Inside phpMyAdmin, you will need to locate your WordPress database. You will see a page showing all your WordPress database tables.
Check the box next to wp_comments
and wp_commentmeta
tables. The name of your comments tables may differ depending on the table prefix you choose during your WordPress installation.
After selecting the comments table, locate the ‘With selected:’ drop-down menu below the table list and select ‘Empty’ from the drop-down menu.
PhpMyAdmin will now show you a warning asking if you really want to empty those tables.
Click on the yes button to continue. This will delete all WordPress comments from your database.
You can also delete all WordPress comments using MySQL console (command line). Simply log into your MySQL console and run this command:
TRUNCATE `wp_commentmeta`; TRUNCATE `wp_comments`;
That’s all, we hope this article helped you learn how to easily delete all comments in WordPress. You may also want to see our list of essential WordPress plugins for business websites
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Debbie Jolly says
I deleted 494,xxx (nearly half a million) spam comments on a site I “manage” (obviously loosely). Got into the phpMyAdmin and… they’re gone! None of them were valid comments because the site isn’t a blog. Only way to reach out is via the Contact form. Thank you!!! Now to keep them from accumulating.
Louis says
Merci! Thanks! Very usefull. 4500 + spam comments deleted in 1 second.
Andre says
Excellent plugin. Thank you
WPBeginner Support says
You’re welcome
Admin
Gagan says
Hi,
just wanted to update everyone regarding the comments plugin.
This plugin has expired – Delete All Comments
Another great plugin I found is Bulk Delete Comments – By Shah Alom, which deletes all comments in one click.
WPBeginner Support says
Thank you for sharing an alternative you’ve used
Admin
Bernard Vella says
Thanks for your help. I cleared the tables and all messages were gone.
However the unread marks near the Comments are still there. Is there a way to clear it up too? Thanks
WPBeginner Support says
You would want to check with your theme’s support and they should be able to assist with removing that count
Admin
Rid says
Thank you very much. I really found this helpful and solved my problem. I had more than 2000 comments generated automatically by woo-commerce which I don’t use anymore on my site. I was able to delete all comments using phpMyAdmin following your instruction.
WPBeginner Support says
Glad our guide was helpful
Admin
Fabrice Hafashimana says
The suggested plugin has been deleted. I can’t use it
WPBeginner Support says
Thank you for letting us know, we will take a look for alternatives for us to update our article
Admin
Ghanshyam says
It works for me.
Thanks!
WPBeginner Support says
You’re welcome, glad our recommendation worked
Admin
Yasmin B says
Thank you used this today as my client has 12000 spam comments. Thank you
WPBeginner Support says
Glad our article could help make that process easier for you
Admin
Quy says
TRUNCATE `wp_commentmeta`;
TRUNCATE `wp_comments`;
This’s truly amazing!
Thank you
WPBeginner Support says
You’re welcome, glad our guide could be helpful
Admin
Vishal says
Thanks, It was very easy by following your steps to empty the comments. It was really helpful.
WPBeginner Support says
Glad our guide was helpful
Admin
Ravi says
Thanks. Plugin is not working but I have deleted from database.
WPBeginner Support says
Thank you for letting us know about the plugin, glad the database method was able to help you
Admin
christoper stalin says
This is a very good content for readers. Thanks for this blog.
WPBeginner Support says
Thank you and thanks for reading our content
Admin
elena says
can you update? plugin is not loger update
WPBeginner Support says
We will certainly take a look at updating the article
Admin
Jasom Dotnet says
When using phpmyadmin then you need to delete also wp_option called “_transient_wc_count_comments” so admin comment count will be reseted.
dylan says
Thank you very much I had been looking for a way to fix this issue
Rohit says
Thanks Buddy, Such a cool trick to delete comments. It worked out for me.
Gulshan Kumar says
This one is cool trick. I’m wondering, is it possible to do some cool task in self hosted WordPress using Bookmarklet?