How to transition cookies from .subdomain.domain.com to .domain.com with minimal impact on users?

This answer may help. To quote:

The basic code you need here is this in the wp-config file:

define('LOGGED_IN_COOKIE', 'login_cookie_name');
define('AUTH_COOKIE','auth_cookie_name');
define('COOKIE_DOMAIN', '.example.com');
define('COOKIEHASH', 'random_hash_here');

Put that in the config across multiple sites, set the keys and salts to be the same, and you’ll have login cookies that work across the domain and subdomains.

Leave a Comment