0

I have a small networks of sites setup locally,

mymainsite.localhost
mymainsite-variation1.localhost
mymainsite-variation2.localhost

I am logged into mymainsite.localhost/wp-admin and navigate to mymainsite-variation1.localhost I am asked to login, my assumption would be that the cookie is shared across my network? Am I incorrect in my thinking?

Would that only work if my multisites were setup like,

mymainsite.localhost
variation1.mymainsite.localhost
variation2.mymainsite.localhost

Obviosuly on launch to prod it will be frustrating for my editors and admins if they need a session per site.

For reference the relevant part of my wp-config.php looks like this,

define( 'WP_ALLOW_MULTISITE', true );


define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
define( 'DOMAIN_CURRENT_SITE', 'mymainsite.localhost' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 2 );
define( 'BLOG_ID_CURRENT_SITE', 2 );
define( 'COOKIE_DOMAIN', '');
define('COOKIEPATH', '/');

Any help and guidance on getting a single login working across my network would be great. Thanks in advance.

1
  • 1
    Cookies are per-domain, so no, they won't be shared. Dec 31, 2023 at 6:40

0

Your Answer

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