Skip to content

Instantly share code, notes, and snippets.

@3200creative
Created November 14, 2013 16:05
Show Gist options
  • Save 3200creative/7469395 to your computer and use it in GitHub Desktop.
Save 3200creative/7469395 to your computer and use it in GitHub Desktop.
3 WordPress comment related SQL queries. unaprove all comments, delete all unapproved comments, and delete spam comments
UPDATE wp_comments SET comment_approved = '0';
DELETE from wp_comments WHERE comment_approved = '0';
DELETE FROM wp_comments WHERE comment_approved = 'spam';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment