wp-admin Β» How to delete all comments in WordPress? πŸ—‘οΈπŸ’¬

How to delete all comments in WordPress? πŸ—‘οΈπŸ’¬

WordPress uses the wp_commentmeta and wp_comments tables to store comments and their data.

To delete all comments in WordPress simply empty those tables in the database:

TRUNCATE `wp_comments`;
TRUNCATE `wp_commentmeta`;

To delete all spam comments use:

DELETE FROM `wp_comments` WHERE `comment_approved` = 'spam';

To delete all unapproved comments use:

DELETE FROM `wp_comments` WHERE `comment_approved` LIKE ('0');

NOTE: In the above commands change wp_ prefix with the table prefix that you are using *(view it in wp-config.php file).

image 7 - How to delete all comments in WordPress? 🗑️💬

Another option to delete the SPAM, Pending, or ALL comments from the WordPress website is a free plugin:

See also  How to remove meta generator tag from WordPress

Was this post helpful?

Leave a Comment

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.

Recommended