SQL Query to Delete WordPress Comments

Delete all WordPress comments:

DELETE FROM wp_comments;

Delete WordPress unapproved comments:

DELETE FROM wp_comments WHERE comment_approved = '0';

Delete WordPress approved comments:

DELETE FROM wp_comments WHERE comment_approved = '1';

Delete WordPress spam comments:

DELETE FROM wp_comments WHERE comment_approved = 'spam';

More Related Posts