How To Bulk Delete All Comments In WordPress

Written by: Muninder

Updated: October, 30, 2021

There might be multiple reasons why you have thousands of comments on your posts. For one WordPress is the most popular CMS making it a primary target for Spam and other hacking attacks. The other reason is you might have forgotten to update WordPress discussion settings.

It is a tedious task to remove all the comments. Even with the bulk select option, sometimes it takes hours to do it.

So here are a few methods on how you can delete all comments and manage your blog in a better way.

Note: Just in case, keep a back up of your site. Here is a guide on how to simply back up your WP site

Method 1 : The easiest of all – Bulk delete

Step1: Click on the Comments tab on the WordPress dashboard

Step2: Choose either all comments or approved or pending or trashed comments

delete WP comments in bulk

Step 3: Click on the screen options and change the number of items per page to 999 (the maximum you can set)

Step 4: Use the bulk delete option. If you have thousands of posts, this might take some time.
Note: If you are on a shared server, these kind of long requests my not be processed by your server. In such cases, you can reduce the number of items per page in Screen Options on WP Dashboard.

Method 2 : Delete All WordPress Comments Plugin

It is also as easy as it can get. With over 30k installs and regular updates, this plugin seems to be safe. However, you can always delete such plugins after you delete the comments.

Once you install the plugin, it is pretty much self-explanatory

As you can see, you can pretty much customize and delete comments as you wish.

If you want to do it the geek way, you can do it from the database.

Method 3: Deleting comments from the database

Get into your PHPMyAdmin and search for the comments table. You can use simple CMD+F or CTRL+F and type comments to find your comments table

You can see comments and comments metatables. Choose the comments table.

Go to the SQL section on the table and use the following SQL command
deletes from wp_comments where comment_approved=”0″;

This is SQL quarry for default table names. Most of the time, this should work. Sometimes, while installing WordPress, you might customize your database name, and then it might result in errors.

In such cases, all you have to do is replace WP_comments with your comments database name. To make it easy, SQL editor on PHPMyAdmin shows you comments table name in blue in single quotes on the editor.

All three methods are effective. If you are a WordPress beginner, go with method 1 or 2. If you know your way around CPanel and opened PHPMyAdmin before, you can use method 3.

by