0

I am migrating from a single wordpress site to a multisite wordpress instance. I migrated my users by copying from the table wp_user and wp_usermeta into my new multisite wordpress instance. The problem now is that all the users are only shown in the root site and I want it to be in the subsite not the root site. How do I move all the users to the other site?

0

Let's assume that your prefix is wp_, your blog ID of your main site is 1, and the blog ID of your sub-site is 2.

In the wp_usermeta table all rows with a meta_key starting with wp_ (and not any number after it) are applied to the main site. To make them apply to the subsite, they need to start with wp_2_ instead. This will give the users roles in the site with blog ID 2.

You may also need to take the row from the wp_options table of the original single site, that has an option_name equal to wp_user_roles and put it in the table wp_2_options of the multisite, but also change the option name to wp_2_user_roles. This will move the available roles to the site with blog ID 2.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.