Sharing same cookie session with multiple wordpress installs on same domain?

I am trying to use this on both wp-config.php files of each install within the same domain which is the subdomain im using for the main site.

So to be clear here… the 2 wordpress installs are on a subdomain.. the first install at http://mysubdomain.domain.com/ the second install is in a folder… http://mysubdomain.domain.com /wp-install-2/

While logging into the first base site click on the next site which is /wp-install-2/ I am not logged in.

What can I do to make this work for “latest wordpress version 4.5.2”

Every install is exactly the same. Both installs are using the same database.

What am I missing?

    define('WP_DEBUG', false);
    define( 'CUSTOM_USER_TABLE', 'wp_users' );
    define( 'CUSTOM_USER_META_TABLE', 'wp_usermeta' );

    define( 'COOKIE_DOMAIN', '.domain.com' ); // Dot prefix
    define( 'COOKIEPATH', "https://wordpress.stackexchange.com/" );
    define( 'COOKIEHASH', md5( 'mysubdomain.domain.com' ) );

If anyone has this working perfectly please help. I have been banging my head since many days..

Thank you

Leave a Comment