Login cookies lost on subdomains (fix)
-
Need to write the following to wp-config.php above the “Stop editing” line:
/* Multi-subdomain cookies */ define( 'COOKIE_DOMAIN', '.yoursite.com' ); // Dot prefix define( 'COOKIEPATH', '/' ); define( 'ADMIN_COOKIE_PATH', '/' ); define( 'SITECOOKIEPATH', '/' ); define( 'COOKIEHASH', md5( 'yoursite.com' ) );
May be some of it is redundant but I added them all just in case. People say COOKIEHASH is important in latest versions as well, at the very least. And the first line is what makes your cookie universal for the whole 3rd level on the domain.
- The topic ‘Login cookies lost on subdomains (fix)’ is closed to new replies.