Forked from carlosleopoldo/delete-orphans-usermeta.sql
Created
April 25, 2016 19:22
-
-
Save MarceloPedra/8ef1645c04cd9ccf40bf1b769355ff7b to your computer and use it in GitHub Desktop.
Delete all orphans user meta in WordPress
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