Ultimate Guide on WordPress Multisite Domain Mapping

Often we are able to make a multisite over the wordpress but we don’t know how to map a custom domain with the child blogs of the wordpress multisite. This guide aims to help you create and map a domain at your wordpress multisite network. WordPress multisite domain mapping is indeed quite easy to be done and for this purpose I am going to introduce you a plugin and some slight usage of cpanel where your website is hosted and after that you will be all set to go through the mapping procedure of domain at the wordpress multisite.

Learn How to Map Custom Domain at the WordPress Multisite Network:

At this point I am sure that you already have a network of wordpress site enabled. Now, you need to purchase a domain. Get your domain which you want to add to your Multi-site network.

Suppose the domain is talkofweb.com , after purchasing the domain, just download this plugin (Note: Don’t Install it through the dashboard, just download this plugin in zip format in your PC) Download WordPress MU Domain Mapping

After downloading the plugin (WordPress Multisite Domain Mapping) Extract it inside your PC. In the extracted folder, just take out the file sunrise.php, and then upload the rest folder to the wp-content/plugins directory of your multisite network through using the FTP. The sunrise.php file must be uploaded to the wp-content directory alone.

Again using the FTP, edit wp-config.php file of your WordPress multisite installtion. The wp-config.php file is present in the public_html directory just in the root of the wordpress installation. You need to add the following code where you have already added the enabling code of the wordpress multisite feature. (Keep in mind that if the same lines are present already then don’t add below lines)

define('WP_DEBUG', false);
define('WP_ALLOW_MULTISITE', true);
define('SUNRISE', 'on'); // Add this line here:
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false );
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'localhost' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
/* That's all, stop editing! Happy blogging. */

After adding the above code, save and upload wp-config.php!

Login to your wordpress network, by going to yoursite.com/wp-admin, there go to plugins and network activate the “WordPress Multisite Plugin“. You’ll need to go to My Sites>Network Admin>Plugins.

Network Activate WordPress Multisite Plugin

Again in your same dashboard, go to Settings>Domain Mapping , there just provide the IP address of your server and save the changes. The IP address of the server is same where your site has been hosted for network purposes.

The next step is to park your purchased domain in the cpanel of the network activated wordpress site, for this purpose go to yoursite.com/cpanel, just login there and then go to the Parked Domains. From there add a domain to be parked.

Park Domain Cpanel

After parking the domains just wait for 10 minutes, and visit the same domain which you have just parked. In this case you will be redirected to your own home page of the wordpress multi-network site. That means the domain has been added well! (Keep in mind the nameservers of this new domain must be same as the nameservers which you used for the multisite network main domain i-e used as yoursite.com in this tutorial)

Now, go back to the Network Admin dashboard, there you need to select My Sites>Sites

Add Site Multinetwork WordPress

There you need to add a new website, just fill in the things, as you may like.

Add New site to the WordPress Multinetwork

After adding the site, just visit the dashboard of the added site (My Sites>Test Site For Talk Of Web Tutorials>Dashboard) , at the dashboard go to Tools>Domain Mapping , there add the same domain which you have just parked and tick the option to make it as primary domain and hit okay! Now, just visit your site and you’ll be able to excess the added site with the domain which you have just parked and added to this newly added site through using the wordpress multisite domain mapping.

Add New Domain to the Sub Blog

That’s it you have learned how to map domain in a network install of WordPress.

Do you want to learn WordPress In Detail? Then I have compiled the whole collection of tutorial in this post! Learn WordPress in a Month

1 Comment

  • Great topic, I would just appreciate some guide, how to change primary domain in Multipress, since usually, setting it all up on testing domain may be a little hell, when you need to copy all the configuration to the live site.