Shared Members between two different wordpress installations with different databases

I had to do something similar. What you need to do first is in each of your config files define the table prefix … make sure that they are different.

Example: WordPress installation 1: wp123_ WordPress installation 2: wp124_

Your first installation would be your main installation the one with the user table you want to use. Then in the second installation’s config file you need to add this in it:

//Adding so that this blog uses the same user tables as the main

define('CUSTOM_USER_TABLE', 'wp123_users');
define('CUSTOM_USER_META_TABLE', 'wp123_usermeta');

Also what you need to do is put the sites in a shared database. So that the database name is the same, database user is the same, and database password is the same. Basically connection is the same. If this make sense.

What i have above is what will allow for two different WordPress installations to share the same user base.

Leave a Comment

tech