Skip to content

Instantly share code, notes, and snippets.

@lumpysimon
Created June 16, 2019 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lumpysimon/4761905133bc55c60fd71f3e852b0c27 to your computer and use it in GitHub Desktop.
Save lumpysimon/4761905133bc55c60fd71f3e852b0c27 to your computer and use it in GitHub Desktop.
MySQL commands to delete spam WordPress comments & commentmeta
delete from wp_comments where comment_approved='spam';
delete from wp_commentmeta where comment_id not in (select comment_id from wp_comments);
delete from wp_commentmeta where meta_key like '%akismet%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment