Created
September 22, 2021 12:25
-
-
Save PierreThiollent/51825a168e3b812a5195b5b4df0e008d to your computer and use it in GitHub Desktop.
WordPress - Delete all orphans user metas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM wp_usermeta WHERE NOT EXISTS ( | |
SELECT * FROM wp_users | |
WHERE wp_usermeta.user_id = wp_users.ID | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment