I have two wordpress installations with same host with different folders. Each installation uses its own database. I mean, database are separated. I am not using one database for two wordpress installations.
My Problem: I have two different member databases. Because my wordpress installation databases are not shared. So i want to use wpA database as my main database for sharing users only. And my second wpB installation must use its own table, but only must use members from wpA database.
How can i do that ?
Summary
-
I have wordpress installations in different directories.
-
I have different databases for both installations.
-
I want to use wp installation b use wp installation a members as a default members.
-
If somebody wants to register on wordpress b, he should registered on database A automatically.
-
If somebody logged in wordpress site A using database A, they can be verified on wordpress site b without extra registration.
I donât know English very well so if I made mistakes, I am sorry.
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:
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.
Since they are on the same server, I think you can probably do this. However, my PHP is not that great, so this is just a starting point.
http://codex.wordpress.org/Editing_wp-config.php#Custom_User_and_Usermeta_Tables