0

I have multiple wordpress installation, and I would like them to share the same usertable.
The wordpress installations are already up and running, and they all have their own database.
Is it possible to somehow define the users database too and not only the table in the database?

define( 'CUSTOM_USER_TABLE', $table_prefix.'my_users' );
define( 'CUSTOM_USER_META_TABLE', $table_prefix.'my_usermeta' );

Any help appreciated.

1 Answer 1

2

After writing those two lines in wp-config.php, your users data will be shared between both installations, but both installations will also need to have the same cookie parameters, so in wp-config.php file of your second installation, modify the COOKIE_DOMAIN like this:

define('COOKIE_DOMAIN', '.{yoursite.com}'); //replace with URL of first site
define('COOKIEPATH', '/');

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.