background preloader

Shared User Table

Facebook Twitter

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 .

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 . $this->cap_key = 'wp_capabilities'; Find all: $this->ID, $wpdb->prefix.' And change them to: $this->ID, 'wp_user_level' Share users amongst two WordPress sites. Share session for multiple wp installs. How To share Users between Wordpress Blogs. Hack to share users between two or more wordpress blogs. The blogs must be on the same server If you have a blogs network this is the best way to share users betweet blogs. You must Remember this few rules: It’s a Core modification, so made first a totally backup (files + MySql Db)Blogs must be on the same serverDb Table Prefix must be differentBlogs must use the same DB Apply this code into your wp-config.php file in your second (or third or fourth ecc…) wordpress’s installation in their each root directory just before: Where “wp_” is the prefix of the main db blog.