How to use 2 blogs with the same users.
-
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
- The topic ‘How to use 2 blogs with the same users.’ is closed to new replies.