Last active
December 21, 2015 11:58
-
-
Save toddlahman/6302252 to your computer and use it in GitHub Desktop.
Wordpress Delete All Spam Comments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This SQL statement will remove all the unapproved comments at once: */ | |
DELETE FROM wp_comments WHERE comment_approved = '0'; | |
/* This SQL statement will remove all the spam comments at once: */ | |
DELETE FROM wp_comments WHERE comment_approved = 'spam'; | |
/* This SQL statement will remove all pingbacks and trackbacks: */ | |
DELETE FROM wp_comments WHERE comment_type = 'trackback'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment