When you enable WordPress Multisite, the behavior of WP_HOME and WP_SITEURL changes significantly. This is a deliberate design choice within the Multisite architecture.
Simply put, in a Multisite network, the main site’s address is treated as the “root” of the entire network. It requires absolute stability. Consequently, WordPress core code prioritizes the values stored in the database, effectively overriding any definitions for these constants in your wp-config.php file.
If you need to change the primary site address (for example, when migrating domains or switching from HTTP to HTTPS), you shouldn’t try to force it via wp-config.php. Instead, follow the method below.
📝 The Recommended Method: Using the Dashboard
This is the safest and most intuitive approach, especially if you aren’t comfortable editing the database directly.
1. Temporarily Disable Multisite
Open your wp-config.php file and locate the line that says define('MULTISITE', true);. You need to temporarily disable this feature by changing it to false or commenting it out.
// define('MULTISITE', true);
define('MULTISITE', false);
2. Update the URLs
Save the file and log in to your WordPress Dashboard. You will notice that the fields under Settings > General for “WordPress Address (URL)” and “Site Address (URL)” are now editable. Update them to your new desired URL and click Save Changes.
3. Re-enable Multisite
Once the changes are saved, open your wp-config.php file again. Revert the change you made in step 1 by setting it back to true.
define('MULTISITE', true);
4. You’re Done!
Save the file and log back into your dashboard. Your new site URL is now active and correctly configured.