#StackBounty: #redirect #customization Turn off redirect to canonical domain (or host website on any hostname)

Bounty: 50

I want to have various development (say dev.example.com) and staging environments of a WordPress multisite (example.com). For this it would be great if WordPress wouldn’t redirect to what it considers the canonical domain name.

I’m running into trouble with this in my wp-config.php:

define('DOMAIN_CURRENT_SITE', gethostname());

It redirects to example.com or gives me database errors.

This is after wp search-replace example.com dev.example.com.

Is it possible to turn off this redirection? If so, how?

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.