Multisite is a powerful tool for hosting many WordPress websites under the same domain. Changing the primary domain of a WordPress multisite requires updates in several locations. You will need access to the database and SFTP for your site before proceeding.There are also a few items to be aware of when changing these values.
Updating a multisite domain begins in the database of the website. Be sure to consistently use the same version of your domain, and not switch the spelling or change between www/non-www.
We recommend using the non-www variation (EX: domain.com) instead of the www version (EX: www.domain.com) to ensure your subsites write their dependent URLs correctly.
NOTE: If your site uses a custom database prefix, this will impact the table names listed below. If this is the case then replace wp_ with your prefix in the following table names, or change your database prefix.
NOTE: The next database changes are required only if you have already added subsites. If you do not have subsites, skip to the next part of the guide.
If you’re comfortable with the database and simply need a brief list of the locations, they are found here. We’ve also noted where the http or https protocol should be included.
Be sure to also update the wp-config.php file as detailed below.
The last step requires modifying the WordPress configuration file on your website.
define( 'DOMAIN_CURRENT_SITE', 'newdomain.com' );
If you see the following lines, delete them. They will overwrite your database defines in some areas and will cause issues:
define( 'WP_HOME', 'http://somedomain.com' );
define( 'WP_SITEURL', 'http://somedomain.com' );