• I’ve read a few topics here about to share users with two wordpress installations, but there were problems with a ‘You don’t have permission…’ message, I finally find out how you can solve this.

    So, how can you have the users of wordpress installation A too on wordpress installation B:

    Step 1
    The two installations should be in the same database, you can do this with the prefix options.

    The next steps are only for wordpress installation B:

    Step 2
    Find wp-settings.php, open it with a text-editor and find:

    $wpdb->users          = $wpdb->prefix . 'users';

    Change it to

    $wpdb->users          = 'wp_users';

    Find:

    $wpdb->usermeta       = $wpdb->prefix . 'usermeta';

    Change it to:

    $wpdb->usermeta       = 'wp_usermeta';

    Step 3:

    Find wp-includes/capabilities.php, open it with a text-editor and find:

    $this->cap_key = $wpdb->prefix . 'capabilities';

    Change it to:

    $this->cap_key = 'wp_capabilities';

    Find all:

    $this->ID, $wpdb->prefix.'user_level'

    And change them to:

    $this->ID, 'wp_user_level'

    This steps will do the trick and you can now login on both wordpress installations with the same username and password.

    I don’t know if it works with WordPress versions < 2.1

    Davey

Viewing 16 replies (of 16 total)
  • geckospyker

    (@geckospyker)

    It took me a few times of running davey579’s hack in conjunction with the suggestion posted by jstroh to get this right.

    I had a fairly new installtion of WP 2.3.3 and wanted to install a few more. Since the topics are marginally related it sounded like a good idea to use a common user table for user and usermeta info. So, jstroh, I did follow your post! Very helpful indeed. I followed the modifications for wp_config to define the custom table (it didn’t work at first, but it could’ve been me). Then I followed steps 2 and 3 from davey579’s post. After which I followed the suggestion from DKN’s post.

    As for the PostAuthor problem I did not find a wp-admin/admin-db.php in the WP 2.3.3 installation files. Is there any other file that for the v2.3.3 that will solve this? I tried to search the files, but didn’t come up with anything.

Viewing 16 replies (of 16 total)
  • The topic ‘How to use 2 blogs with the same users.’ is closed to new replies.