Created: 2017.06.12
After changing my virtual host names in MAMP Pro, I suddenly found myself unable to log in to any of my WordPress multisite sub sites.
This was immediately frustrating, as it meant that I couldn't store notes in my knowledge base anymore.
Some initial research indicated that this probably wasn't a browser issue. It was probably more to do with WordPress not being able to find cookies where it expected to.
Unlike regular WordPress sites, where there is a wp-config.php
for each site, a WordPress multisite only has a single wp-config.php
. How then to apply a site-by-site fix for this strange issue?
Google led me to Can't log in: “ERROR: Cookies are blocked or not supported by your browser. You must enable cookies to use WordPress.” but only took from it that the circulated solutions didn't work.
However after locating the same information independently, I found that adding these lines to wp-config.php
actually did work:
define('ADMIN_COOKIE_PATH', '/');
define('COOKIE_DOMAIN', '');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');
Phew!