Skip to content

Instantly share code, notes, and snippets.

@toddlahman

toddlahman/gist:6302252

Last active Dec 21, 2015
Embed
What would you like to do?
Wordpress Delete All Spam Comments
/* 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
You can’t perform that action at this time.