In a recent project, I found myself having to share user tables between two separate WordPress installations. This is common in multi-lingual websites, but might just come in handy for you as well. I am assuming you already have a WordPress installation in place and are now installing a second one. You’ll need to open your first WordPress installation’s config.php file and copy the database configuration and paste it into the second. This allows both installations to use the same database.
Now we need to make sure that we don’t overwrite our content, so we’ll change the $table_prefix value to something unique like “wp2″.
$table_prefix = 'wp2_';
All we need to do now is grab the user tables by adding the following lines. This is assuming you left the tables prefix to “wp” when you installed WordPress the first time around.
define('CUSTOM_USER_TABLE', 'wp_users'); define('CUSTOM_USER_META_TABLE', 'wp_usermeta');
Done. Install as usual and enjoy your shared user tables.
It’s been brought to my attention that by using this method, you would be unable to log in to the second installation by using the default administrator login. I’m looking at work-around solutions but for the time being, you should be able to create a new user with admin access that could exploit both installations.