Share user login between wordpress instalations

Question

I’m using the following aproache to share user login details between wordpress installations.
The issue is that admins, on the secondary installation can’t access the dashboard.
Any ideas why?

Primary database “MyMainWPDB” (leaving it untouched)

Secondary database “MySecondaryWPDB”

drop wp_users

drop wp_usermeta

CREATE VIEW wp_users AS SELECT * FROM MyMainWPDB.wp_users

CREATE VIEW wp_usermeta AS SELECT * FROM MyMainWPDB.wp_usermeta

use the following wp-config.php info on both instances

define(‘AUTH_KEY’, ‘xxx’);

define(‘SECURE_AUTH_KEY’, ‘xxx’);

define(‘LOGGED_IN_KEY’, ‘xxx’);

define(‘NONCE_KEY’, ‘xxx’);

define(‘AUTH_SALT’, ‘xxx’);

define(‘SECURE_AUTH_SALT’, ‘xxx’);

define(‘LOGGED_IN_SALT’, ‘xxx’);

define(‘NONCE_SALT’, ‘xxx’);

Thank you so much.

0
PedroSimao 3 months 0 Answers 15 views 0

Leave an answer