Delete Wordpress comments from the database

Опубликовано: 20 Июль 2026
на канале: Frank Deardurff
216
4

I get asked from time to time from WordPress site owners that do not have any comment management in place or have forgotten to uncheck allow comments on a post. So I thought I would provide a tutorial in case others was looking.

I know there are plugins for this but we already have so many plugins loaded and this is something you only use in certain cases.

====== SQL Queries To Use ======
To Delete Wordpress Comments Not Yet Approved:
DELETE FROM wp_comments WHERE wp_comments.comment_approved = '0'

TO Delete Wordpress Comments Already Approved:
DELETE FROM wp_comments WHERE wp_comments.comment_approved = '1'

To Delete Wordpress Comments Marked As Trash:
DELETE FROM wp_comments WHERE wp_comments.comment_approved = 'trash'

To Delete Wordpress Comments Marked As Spam:
DELETE FROM wp_comments WHERE wp_comments.comment_approved = 'spam'base, then watch this video to learn everything you need to know about Delete Wordpress comments from the database

Delete Wordpress comments from the database - https://frankdeardurff.com If you are looking for Delete Wordpress comments from the database, then watch this video to learn everything you need to know about Delete Wordpress comments from the database