When starting with my blog I used different domain name but afterwards decided to change it. But with WordPress Multisite installation it wasn’t that simple. I studied the case and found out that it is not possible to do it from Admin Dashboard, like you would do with a single site installation.
Reason for me using Multisite installation is quite simple – I have additional domains for testing purposes, as test environment.
After some Googling I found a very good article from WPEngine site. To put it shortly, here is what you should do.
Check and change domain name in the following database tables: wp_options: options named “siteurl” and “home” wp_site: wp_sitemeta: the option named “siteurl” wp_blogs: any entries in the “domains” column that have the old domain name wp_#_options: # is referring to blog_id. If tables are existing, check options "siteurl" and "home".
Check and change following lines in wp-config.php file: define( 'WP_HOME', 'http://example.com' ); define( 'WP_SITEURL', 'http://example.com' ); Check code snippet below and change current site: define('WP_ALLOW_MULTISITE', true); define( 'MULTISITE', true ); define( 'SUBDOMAIN_INSTALL', true ); $base = '/'; define( 'DOMAIN_CURRENT_SITE', 'http//example.com' ); define( 'PATH_CURRENT_SITE', '/' ); define( 'SITE_ID_CURRENT_SITE', 1 ); define( 'BLOG_ID_CURRENT_SITE', 1 );
And you are done!