Previous threads have helped me share users between two WordPress installs, but I ran into a problem: When a user logs into one, they’re not logged into the other (and vice versa.) I’d really like to transfer the session between the two and only require users to log in once.
Here’s what I did to share users, if it’s helpful. “Secondary” refers to the WordPress Installation residing within a subdirectory of the “Primary” WordPress Installation:
to wp-config.php in Secondary WordPress root.
$this->cap_key = $wpdb->prefix . ‘capabilities’;
$this->cap_key = ‘wp_capabilities’;
in capabilities.php in wp-includes of Secondary WordPress install
Thank you for all your help!
See if this helps.
I’d really like to transfer the session between the two
WordPress does not use sessions, and if the URL’s of the two sites are on different domains, then the cookies cannot be passed from one to the other (browser security restrictions). Therefore what you want is not possible in such a case.
In multiple folders on the same domain, it can be done, as shown by the link given above.
I’m sorry, I wasn’t sure which method WordPress used.
In any case, the recommended solution worked without a hitch and I’m very impressed with its simplicity. Thank you, thank you.Anonymous
Thanks, it works for me.
the solution linked to is unsolved for 2.6 but closed for comments.
Does anybody know how this might be done in 2.6.1?
I’m sure this must be a common situation. I just want one set of cookies that cover the whole domain. I can’t ask users to re-login to every part of the site!
i did it in wordpress 2.6 like this:
- The topic ‘Single Login across Multiple WordPress Installations’ is closed to new replies.