Last active
April 11, 2017 22:46
-
-
Save austinginder/a54ec0d9d64159fb4edd to your computer and use it in GitHub Desktop.
Multisite export to single install
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 all orphans user meta in WordPress | |
DELETE FROM wp_usermeta | |
WHERE NOT EXISTS ( | |
SELECT * FROM wp_users | |
WHERE wp_usermeta.user_id = wp_users.ID | |
); | |
# Remove multisite only columns in users | |
alter table wp_users drop column spam; | |
alter table wp_users drop column deleted; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment