Support » Networking WordPress » Import Users from multiple databases

  • Resolved bluesalman


    I want to import all users from 3 stand alone sites to Multisite Network, where users will be assigned different roles on multisite sites.
    I am using user management plugin for role assignments,
    But problem is when i import users from 3 tables of 3 databases those are all having identical User_ID which will overlap.
    I have tried to use cimy plugin and import users from csv, but no luck.

    I need help how can i merge wp_users and user meta table of 3 different sites and then import those tables to Multisite database.
    Or if there is any other way of doing this though Network admin page….
    Please suggest, ………..Thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • Andrea Rennick


    Customer Care at Copyblogger Media and Studiopress

    do it thru the regular import not the db way.

    That is, if you import the posts, you’ll be asked ‘create a new user or use an existing one?’ for the authors.

    Mind that doesn’t import the people who never wrote a post…

    Thanks all, i am not sure if regular import will take care of user_id issue, all are duplicate user_ids and there are also some duplicate usernames,
    I have tested the DB way by copying 3 wp_users tables into one and i changed the ID and user_id fields by increment of similar integer.
    and then i copied that single table data to Multisite DB wp_users and wp_usermeta table, it was successfull, i also changed changed the wp_cap meta key field to wp_ID_cap, so this preserved the roles for one of my critical child site.
    Now i am working with user assignment to main-site, interestingly when i login using a new user who is subscribed to child site but not to main-site, and try to visit signed in page it allowed to visit and also created met-key field wp_cap in wp_usermeta table.
    User auto management plugin is also active, for automatic role assignment.
    What i require now is only to add meta key wp_capabilities for main site for all users with default role as subscriber.

    I have also tested the WP import method, this works fine for those who have some posts, i have assigned the roles on child site.
    Now they can access the child site and main site also, although they dont appear as a member of main site but they can access the main site, and when they access main site and post something to forums or buddypress activity, they become a member of main site automatically.. and they appear a member of main and child site in dashboard after wards.
    Q. Is this default behavior? (is there a way to manually add all child site users to main site also, so that can appear as in members list buddypress or forums)

    Multisite user management plugin is active and if a user register on main site it is assigned the right role for main and child site.

    Yes, this is default behavior.

    There are plugins to add all users to the main site. Automatically add new users to each site in your WordPress network with the plugin you mentioned 🙂

    Yeh thanks Ipstenu.

    For future users having same requirment:
    I used another plugin “Add multiple users”

    In fact multisite-user-management doesn’t assign roles for users imported to child site, and mine content/users were for child site,
    So Add Multiple Users did the trick there is an option to Add Existing users to other sites.

    Salam Salman 🙂

    I am trying to accomplish the same things. 3 blogs I merged into one network. two of them have multiple users. the users were imported fine, but in one of them, posts do not have their real authors as their authors, but rather, strangely, have authors from the the other blog as their authors.. again, although the users of the original blog are imported, and appear in the users list.
    I found it, the users were imported but not as “contributers” as in the original blog but as “subscribers”. so I had to convert them to contributers and assign their posts to them. This was exhausting and it should have been done automatically.

    For posts/authors relationship: i am not sure about your particular problem, but i think if you import users through sql/database and then you import posts, your user roles and post/author relationship will remain consistent.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Import Users from multiple databases’ is closed to new replies.