Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MarceloPedra/d54cd938d9bf3bad109b0b32b5a0e8da to your computer and use it in GitHub Desktop.
Save MarceloPedra/d54cd938d9bf3bad109b0b32b5a0e8da to your computer and use it in GitHub Desktop.
Delete all orphans post meta in WordPress Raw
DELETE FROM wp_postmeta
WHERE post_id NOT IN (
SELECT ID FROM wp_posts
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment