W
W
wasserbord2018-05-02 07:49:55
MySQL
wasserbord, 2018-05-02 07:49:55

How to share the wp_users table between two sites on the same server and domain?

Domain one.
Server one.
Apache has one host.
There is only one MySQL server (but there are 2 databases - in any case, they started doing this, because using 1 database for 2 sites was considered a mess).
But one site is at the root, the other is in a folder.
And one site is site.ru, and the second is site.ru/papka.
It is necessary to make sure that at least:
1) Log in on both sites under the same logins and passwords.
At the same time, take into account that there is registration, there are bans, maybe something else is / will appear - everything should be synchronized "automatically" (meaning "in advance").
2) Logged in on one site - cookies are valid for another.
I myself had an idea to make a system based on the principle of authorization through a social network (in this case, the root site acts as a "social network", and the folder site acts as a "social network client").
But won't it be necessary to change the core of WP and have a hassle with plugins that also need a user?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question