Support » Developing with WordPress » Staying logged in across multiple Blogs

  • I am currently running a site with 7 blog (7 WP installs on the same database) using the solution at:

    I use one of the blogs as the master and all others are slaves (ie. user roles across all blogs are set to wp_user_roles in all applicable database tables)

    I have edited the capabilites.php in the following way:

    $this->role_key = $table_prefix . ‘user_roles’;
    $this->role_key = ‘wp_user_roles’;

    $this->cap_key = $table_prefix . ‘capabilities’;
    $this->cap_key = ‘wp_capabilities’;

    3- I edited wp-settings.php and made the following 2 changes:
    $wpdb->users = $table_prefix . ‘users’;
    $wpdb->users = ‘wp_users’;


    $wpdb->usermeta = $table_prefix . ‘usermeta’;
    $wpdb->usermeta = ‘wp_usermeta’;

    Currently it is possible or a user to log in to any of the blogs with the same credetials and have the same role in each blog. I problem is that when they switch from blog to blog their login does not transfer. (i.e. they have to login to comment on each blog instead of logging in once and haveing the ability to comment anywhere on the site.)

    I’m 99% sure that this has something to so with the way cookies are handled, but I can’t quite figure it out. Any help/advice would be much appreciated.


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


    just an idea and I am not sure if you checked already,
    but does it set two cookies or one universal cookie?

    i’m interested finding solutions for the same problem.

    can i set 1 cookie for multiple blogs for the same domain address?

    Little by slow little, am finfing tidbits, that may get me to where I can actually understand and use the information.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Staying logged in across multiple Blogs’ is closed to new replies.