How to Delete All WordPress Comments

In some cases, you may decide they want to delete all their WordPress comments. In this article, we will show you how to delete comments in bulk easily in WordPress.

How to delete all wordpress comments

Just like deleting WordPress permanently, there are a lot of reasonable situations when a user really needs to delete all comments without hesitation at all.

For example, you might fill WordPress with silly comments on a site under construction just to see how they would look. You’ll want to delete all of those comments before publishing.

There are many other scenarios where website owners want to remove comments from their WordPress site.

However, if you want to delete spam comments, then go to our guide on how to bulk delete spam comments in WordPress. If you are annoyed by spam comments on your website then make sure you check out these tips and tools for dealing with spam comments on WordPress.

If you do not want such scenarios to happen, continue reading this article.

First, you need to create a full backup of your site and if you don’t know how then refer to the article how to backup WordPress database

Deleting all WordPress comments is one-way action, you can’t go back to the way it was. You won’t be able to undo it once you’ve deleted all the comments. That’s why backing up is so important.

Method 1: delete all comments on WordPress using plugin

The first thing you need to do is install and activate the Delete All Comments plugin. For more details, see our step-by-step guide on how to install the WordPress plugin.

To activate, you need to go to Tools  -> Delete All Comments to appear on the page. This is where you will see the total number of comments on your site, a confirmation box, and a delete button.

Delete all comments

Clicking the delete all button will permanently delete all comments, including spam and spam.

You can visit the comments page and will see all the comments that have been safely deleted on your WordPress site.

Method 2: delete all comments using phpMyAdmin

You can also quickly delete all comments using MySQL or phpMyAdmin. This method is only recommended for advanced users (programmers or SQL savvy). If you are not really sure, ask an experienced person or back up the database before doing so

Log in to the cPanel dashboard of your hosting account. Under Database selection, click on phpMyAdmin.

Php my admin

Inside phpMyAdmin, you will need to locate the WordPress database. You will see a page like below showing all the database tables.

empty comment tables

Highlight the  wp_comments table and the wp_commentmeta table . The names of your comments tables may vary based on the prefix table you selected during the WordPress installation.

After selecting the table, locate the “ With selected:” dropdown below the list table and select “ Empty ” from there.

PhpMyAdmin will now ask a warning question whether you want to delete the data in those tables.

Delete comments php my admin

Click the Yes button to continue. That will delete all comments in your database.

You can also delete all comments using a MySQL statement. Simply log in to the MySQL console and run the command below:

TRUNCATE `wp_commentmeta`;

TRUNCATE `wp_comments`;

That’s all, we hope this article helped you know how to delete all comments in WordPress. Let us know what you think about this by leaving a comment below.

About the Author: Luong Ngoc Anh

Leave a Reply

Your email address will not be published. Required fields are marked *