0

I have 2 wordpress websites on the same server, one is bloo.com and the other is forum.bloo.com. each site has its own database, they have their own wp_content, each has its own file separately, but I want the 2 sites to share the same user, if the user registers on bloo.com, he can connect to bloo. com and forum.bloo.com with the same login info.

As each site has separate files, is it possible for me to make the sites use the same wp_users and wp_usermeta, while the other tables will always be different from each website.

I only want the site to have wp_users and wp_usermeta in common. Basically, I want to create a user who registers on bloo.com or forum.bloo.com can connect to the 2 sites with a single account with this login info.

Please tell me how I can do this and if there is a code I should use please share it with me, thanks in advance.

1
  • 1
    note that this is how multisite on a single install would have worked, with independent tables for each site all under the same install, but shared users/user meta
    – Tom J Nowell
    Commented May 20 at 9:13

1 Answer 1

1

It is likely not worth the risk. A possible problem is that one site changes user data in a way the other site will not be able to understand, breaking it. So... the initial requirement for such a setting to work is that at least one of the sites do not change user data at all, maybe except for the bare minimum.

There is actually an old feature that allows to support the setup that you ask for by allowing you to specifically define which tables hold the user tables in which case the limitation is to have both sites using the same DB, but I have done small research and no one asked how to use this feature for a long while therefor I assume that not many use it in the wild.

Using multisite (as tom commented) is a better solution as it basically takes user management out of the site into a "common area", basically a user and meta table which are common for both sites as you asked for, but with an out of site control of the user. But even in such a setting you will be limited in how sites interact with the meta table and you will need to ensure that whatever plugins you use do not use the same meta keys for the values stored in the user meta table.

multisite also solve the problem of Single Sign On to both sites which I assume you will also want although not explictly specified in the question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.