Change WordPress user roles and capabilities Forums How to or FAQ Migration of plugin and user roles on from a test to live site.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6686
    alicorn
    Participant

    Hi Vladimir,

    Just wanted to ask if it is possible to migrate all my user-roles from my test to live site. My plugin is currently activated only on my test site, and I would like to move everything over to the live site without going trough multiple user-roles again.

    I’ve tried searching but did not find anything. Any kind of help would be appreciated!

    Kind regards,

    Andrija

    #6688
    Vladimir
    Keymaster

    Hi Andrija,

    If you have not too much user roles you can use ‘Export/Import’ buttons to make this role by role. ‘Export’ button write currently selected role to the local file. ‘Import’ button imports role data from the selected file (previously exported).

    This will resolve your task if you don’t care about data set for/by URE additional modules.

    #6693
    alicorn
    Participant

    Hi Vladimir,

    Thanks for the info. I have a lot of users, but I did get most if not all the permissions sorted through roles. So this will definitely save me some time. I would basically need to make sure all my settings are the same first, then export -> import the roles across the two sites, and finish everything up by assigning the users the appropriate roles.

    Kind regards,

    Andrija

    #6695
    Vladimir
    Keymaster

    If you familiar with SQL and the tools like phpMyAdmin, it’s possible to export/import all user roles with less efforts. Suppose the database prefix is ‘wp_’.
    1) Find the WordPress db record with user roles:

    
    SELECT * FROM wp_options WHERE option_name='wp_user_roles';
    

    2) Update all user roles at once:

    
    UPDATE wp_options SET option_value='changed value here' WHERE option_id=NN LIMIT 1;
    

    This post explains in details how and where WordPress stores user roles data.

    Do you use any URE Pro additional modules at the test site?

    #6696
    alicorn
    Participant

    Hi Vladimir,

    Sorry for getting back to you so late. But yes, I do have some URE additional modules.

    Namely:

    Activate Administrator Menu Access module
    Activate “Create” capability for posts/pages/custom post types
    Activate user access management to editing selected posts, pages, custom post types
    Force custom post types to use their own capabilities

    I’ll look at your post, as I’m familiar with SQL. Thanks for your help!

    Best regards,

    Andrija

    #6697
    Vladimir
    Keymaster

    Hi Andrija,

    In this case this is may be interesting for you too:
    1) Base options saved by User Role Editor Pro:

    
    SELECT * FROM wp_options WHERE option_name LIKE 'user_role_editor';
    

    2) Data saved by URE add-ons:

    
    SELECT * FROM wp_options WHERE option_name LIKE 'ure_%';
    

    Before importing ure_posts_edit_access_data record to the live database take into account if posts/pages ID are the same at the source and targets databases.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.