10up / MU-Migration

This WP-CLI plugin makes the process of moving sites from single WordPress sites to a Multisite instance (or vice-versa) much easier. It exports everything into a zip package which can be used to automatically import it within the desired Multisite installation.
MIT License
329 stars 47 forks source link

Users import from Multisite into a single Site #79

Open rootbash opened 4 years ago

rootbash commented 4 years ago

Hi,

I have noticed if I try to import from a subsite within a multi-site network into a single site the users that are setup network wide are messed up. They do not get any roles and they are unable to login using the login credentials they have at the source. So I have to update the user role.

bijanmmarkes commented 4 years ago

:+1: I also noticed the same issue, imports the role names, and keeps them attached to the users, but the roles themselves don't exist.

nunomorgadinho commented 3 years ago

+1 for this issue

reikjarloekl commented 2 years ago

I also encountered this issue and fixed it by running these SQL statements on my wordpress DB after the import. Note that this will NOT merge roles you defined on the site level, but removes them completely leaving you with the roles you had defined on the site level. 3 is the blog id I exported from the multi site. You need to adjust this for your blog id.

delete from wp_options where `option_name` = 'wp_user_roles';
UPDATE `wp_options` SET `option_name` = 'wp_user_roles' WHERE `option_name` = 'wp_3_user_roles';