WordPress is acting like it’s not installed and giving me the ERR_TOO_MANY_REDIRECTS error.
Here’s what I did to create the error
Basically I was trying to update Ubuntu from 18.04 to 20.04 on my site and decided to start with the staging environment. I basically did the following:
- Created new droplet
- Made new group_vars for it copying staging group_vars over
- Provisioned and deployed to new server
- Exported DB from Staging and Imported into new site
- Ran search and replace for new domain name on each site with
wp search-replace --url="sitedomain"
and also for the network itself withwp search-replace --network
- rsynced the uploads directory to the new server
- Tried to go to site and was warmly greeted with ERR_TOO_MANY_REDIRECTS.
Here’s the multisite specific wp-config I have:
/**
* Multisite
*/
define('WP_ALLOW_MULTISITE', true);
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', true); // Set to true if using subdomains
define('DOMAIN_CURRENT_SITE', env('DOMAIN_CURRENT_SITE') ?: parse_url(WP_HOME, PHP_URL_HOST));
define('PATH_CURRENT_SITE', env('PATH_CURRENT_SITE') ?: '/');
define('SITE_ID_CURRENT_SITE', env('SITE_ID_CURRENT_SITE') ?: 1);
define('BLOG_ID_CURRENT_SITE', env('BLOG_ID_CURRENT_SITE') ?: 1);
/**
* Multisite: Get TLDs to work
*
* https://discourse.roots.io/t/multidomain-multisite-without-a-domain-mapping-plugin/7214
*/
define('ADMIN_COOKIE_PATH', '/');
define('COOKIEPATH', '');
define('SITECOOKIEPATH', '');
/**
* Use the current HTTP host as the cookie domain. This ensures cookies and
* nonces are using the correct domain for the corresponding site. Without
* this, logins, REST requests, Gutenberg AJAX requests, and other actions
* which require verification will not work.
*
* https://discourse.roots.io/t/not-sure-how-to-get-multisite-functional-in-dev-environment/15701/2?u=broskees
*/
define('COOKIE_DOMAIN', !empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '');
Here’s the URL Structure
Some additional context is that on this is a multiple TLD multisite setup. So in this context that looks like:
- Staging:
Additional Context
I’ve also got the roots/multisite-url-fixer mu plugin installed.
Some of my investigation uncovered that whatever redirect loop is happening is happening before the muplugins_loaded
action even fires. So I don’t know how much help the roots/multisite-url-fixer plugin is anyways with this issue.
It seems the site redirects to /wp-signup.php?new=<site-domain>
(which notably is not /wp/wp-signup...
) and then gets caught in the redirect loop there.
I’ve honestly no idea what else I could do. I’ve looked at every related forum post and google listing I could find, with no avail.
Anyone have any idea what I could be running into?