Taken from Tom McFarlin.
Though I do the majority of my work using single site WordPress installs, there are a number of sites and projects in which I’ve used WordPress multisite and there’s a problem that I’ve experienced specifically with using WordPress multisite, subdomains, and shared hosting environments.
Specifically, the problem is this:
- Install WordPress and activate multisite
- Configure the installation to use subdomains (versus subdirectories)
- Attempt to login and get stuck in a redirect loop
If you have a single instance of WordPress multisite installed on the same server, there’s no issue, but if you go beyond that then you normally hit a problem: a redirect loop.
The WordPress Multisite Redirect Loop
Once you’ve increased the number of your multisite installs beyond one, then you’re likely to be unable to login as you’ll get stuck in a redirect loop. That is, every time you try to login, you’re returned to the login screen.
Luckily, the fix is relatively easy.
wp-config.php file, add the following lines of code:
define('ADMIN_COOKIE_PATH', '/'); define('COOKIE_DOMAIN', ''); define('COOKIEPATH', ''); define('SITECOOKIEPATH', '');
Just make sure you put this above: /* That’s all, stop editing! Happy blogging. */
- February 22, 2013 @ 05:39:57 [Current Revision] by PeterLugg
- February 22, 2013 @ 05:35:12 by PeterLugg