Support » Fixing WordPress » How can I share users and cookies between two wordpress sites?

  • Hi
    I’ve installed two wordpress site.
    first one is in mydomain.com and second one in mydomain.com/second.
    both of them using one database with different prefixes.
    I’ve added these two line in second installation wp-config.php file:
    define(‘CUSTOM_USER_TABLE’, ‘wp_users’);
    define(‘CUSTOM_USER_META_TABLE’, ‘wp_usermeta’);
    (wp_) is my first installation database prefix.
    I’ve copied :
    ‘AUTH_KEY’
    ‘SECURE_AUTH_KEY’
    ‘LOGGED_IN_KEY’
    ‘NONCE_KEY’
    ‘AUTH_SALT’
    ‘SECURE_AUTH_SALT’
    ‘NONCE_SALT’
    from first installation to second installation.
    Now my problem is here:
    I have to login to each of sites directly.
    Please tell me how can I solve this problem?

Viewing 3 replies - 1 through 3 (of 3 total)
  • leejosepho

    (@leejosepho)

    User sharing does not eliminate the need to log in at each site individually. User sharing simply makes it possible to have one account that will work at any user-shared site…but in order for that to happen you must first give a user account its specific permissions for each site, and that can be a little difficult to get started. Do you already have permissions for both sites in any single user account? I do not remember exactly how I once did that, but I will take a look back and try to help, if necessary.

    Thread Starter Sadegh Hosseini

    (@mr-seven)

    Hi lee
    Thanks a lot for your answer.
    I don’t need all permissions because these two site are different and users don’t need permissions.
    I’ve set cookies for second installation so I think one login should be work. Am I wrong?

    leejosepho

    (@leejosepho)

    Shared users always need specific permissions for each site or else they will show up as “No Role at this site” )when you look at the Users for a given site) and then not be able to log in at all. So, you first need an Admin account with permissions at each site, and then that Admin account will be able to add more users at either site and given them specific Roles while looking at Users at each site.

    Edit: Take a look here and see whether you can make sense of things…

    https://wordpress.org/support/topic/how-to-get-shared-users-past-you-do-not-have-sufficient-permissions?replies=2#post-6507478

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How can I share users and cookies between two wordpress sites?’ is closed to new replies.