Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SQL: Remove orphaned wp_usermeta
DELETE FROM wp_usermeta WHERE user_id NOT IN (SELECT ID FROM wp_users)
DELETE FROM myprefix_usermeta WHERE user_id NOT IN (SELECT ID FROM myprefix_users)
Copy link

wpsmith commented Feb 15, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment