Sorry, we have moved the article to
http://open-source-experiments.blogspot.com/2009/02/setting-up-common-login-across-multiple.html
Filed under: OPen source, tips and tricks, wordpress | Tagged: common user, multiple wordpress installation, open source software, sharing users, table_prefix, wp_capabilities |
Thank you for this post…. I’m making the same thing with multiple blogs and your tutorial helpt me a lot.
Ben
I tied the same thing for my site http://www.kochidaily.com. I have two wp installations one on the main site and another in a folder called jobs. I have inserted the following in the wp-config.php in the http://www.kochidaily.com/jobs
define(‘COOKIE_DOMAIN’, ‘.kochidaily.com’);
define(‘COOKIEPATH’, ‘/’);
define(‘CUSTOM_USER_TABLE’, ‘cd_users’);
define(‘CUSTOM_USER_META_TABLE’, ‘cd_usermeta’);
and the following in the capabilities file under includes in the jobs wp
function _init_caps() {
global $wpdb;
// $this->cap_key = $wpdb->prefix . ‘capabilities’;
$this->cap_key = ‘cd_capabilities’;
$this->caps = &$this->{$this->cap_key};
if ( ! is_array( $this->caps ) )
$this->caps = array();
$this->get_role_caps();
}
I am able to login using the main sites logins to both wordpress installs but unable to share the cookies between the domains. Ie I have to login and logout separately to each install. Loging in into the main site does not log me into the job site. I have to relogin meaning the cookie is not shared.
[…] of the posts I researched were helpful put could only partially solve the problem. The first post Setting up a common login across multiple wordpress installations claimed to solve the issue only helped me in allowing the different sections to use the same login […]
I had to do something similar, this was my solution:
http://fullthrottledevelopment.com/setting-a-single-login-across-wp-wpmu
For WP 2.8.1 and WPMU 2.8.1
Lew
[…] går bara att göra på WordPress installationerna. Mer information om hur man gör detta hittar du här och […]
After upgrade to newer version for eg wordpress 2.8 to 2.9 , Will this hack work?
Loging in into the main site does not log me into the other wordpress installation site. I have to relogin meaning the cookie is not shared.
hi,
i wrote a similar blog post on my experiences getting unified login to work across multiple WordPress installs.
i sited this post as additional resources / further reading..
thanks!
i was looking for one of such guide, recently i am planning for another blog and i want to link them. Hopefully, this will help me in doing so.
This seems like a lot of hacking… good tutorial. but why not wrap it into a plugin then add the plugin to both installs. with the URL of the added URL?
[…] Setting up a common login across multiple wordpress installations […]
And if you have the tables in differents databases ?
[…] https://opensourceexperiments.wordpress.com/2009/02/01/setting-up-a-common-userbase-across-multiple-w… […]
This is not working in wordpress 3.0
Have you had any luck with wordpress 3.0.1??
Getting the “you do not have sufficient privileges” error on WP 3 after going through these steps. Any suggestions?
[…] With single sites, I'm not sure how to do it, but I found this article that might help: https://opensourceexperiments.wordpress.com/2009/02/01/setting-up-a-common-userbase-across-multiple-w… […]
[…] https://opensourceexperiments.wordpress.com/2009/02/01/setting-up-a-common-userbase-across-multiple-w… […]