WordPress Unified User Database

In order to simplify user management of WordPress blogs hosted on our site I wanted to find a way to share users between two separate set ups. This is much easier to do than I had expected. For each setup you need to make sure WordPress uses the same database but different table prefixes.

The first step is to set up the initial blog. Next, set up any additional blogs. For each additional blog you need only add two lines to the wp-config.php file:

define('CUSTOM_USER_TABLE', 'wp_users');
define('CUSTOM_USER_META_TABLE', 'wp_usermeta');

wp_users should point to the original blog user table. wp_usermeta should point to the original blog user metadata table. From here on out you can configure and manage your blogs as normal. The only difference will be that users who have not been assigned a role for a specific blog setup will be listed under the “No role for this blog” category on the Users tab.

References: