Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Delete orphaned post meta within WordPress
DELETE pm FROM wp_postmeta pm
LEFT JOIN wp_posts wp ON wp.ID = pm.post_id
WHERE wp.ID IS NULL
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.