WordPress Multisite Domain Mapping Tutorial – Definitive Guide

Ankit Singh (Dev)
3 years ago / Updated - April 30, 2016
WordPress Multisite Domain Mapping Tutorial – Definitive Guide

Creating a network in wordpress platform is better then installing separate WP installation  but when when it comes to manage network networks of sub-domain and sub-directory then its not feels like multisite. Actually according to me multisite are those which we can manage multiple sites that have multiple external domains not sub-domains or directory. First of all thanks to WordPress MU Domain mapping plugin developer to make this plugin which map any custom domain in your multisite network. There is no limit in sites you can add in your network just add sites, your custom domain and after manage WP-admin dashboard of any site in your network without log-in separately.

if you see through web you found WordPress users not mostly work with sub-domains, They mostly use multiple custom domains and install wordpress separately in it so with the help of domain mapping you didn’t need to this again.

Actually this tutorial is made your multisite network to a blog hosting service provider same as WordPress.com, let users can register on your network and make their own free blog and add map a custom domain but if you want to use domain mapping for your own use then disable users registration from Network admin > Network settings > “Registration is disable”.

Note – Make sure you install wordpress multisite using Sub-directories not Sub-domains, if you don’t do this invert the changes into “Wp-config.php’ file through instructions below.

Edit your “wp-config.php” file and turn “FALSE” on “Sub-domain_install”

subdomain-false-multisite

Now open Network admin > Settings > Network setup > Copy all “.htaccess” lines to your current .htaccess file (Delete all lines from current and then paste the new lines).

 

Install and configure WordPress MU Domain mapping plugin

> Custom domain mapping + WP multisite is only based on this plugin so first install the plugin into Network admin > Activate > and follow some manual configuration instruction to run plugin functionality.

> Edit your “WP-config.php” file through FTP client or control panel file browser and add a below line just after comment “That’s all, stop editing! Happy blogging.”

define( 'SUNRISE', 'on' );

Sunrise-on-multisite

> Move “Sunrise.php” file from WordPress Mu plugins directory plugin directory(/public_html/wp-content/plugins/wordpress-mu-domain-mapping/) to “/public_html/wp-content/” directory.

> Now open Network admin dashboard > Settings > Domain mapping or domains now working.

Create a new site in network and add custom domain

Now its time to add a custom domain into your network multisites. Before starting log-in your domain provider and wordpress hosting provider panel both to new tabs. We are using Go-daddy domain panel and Hostgator c-panel in our screenshot so don’t confuse if my panel looks different from your hosting provider or domain provider.

Go to Network admin dashboard > Sites > Add new

add-site-multisite

Site address – Input any letter or number( for ex “a”) to make a unique address of your new site that use when your custom domain open in web browser.

Site title – The name of your new site same as wordpress installation step. For Example (Davin’s Blog).

Admin email – Email of admin who use and manage the site. Don’t enter email you already use in network admin.

After adding a site open Network admin > Sites > All sites and edit those you want to add custom domain > Capture site id from address bar from your browser ( http://example.com/wp-admin/network/site-info.php?id=5 so your site id is 5 )

Now went to network admin > Settings > domains > and fill “New domain” fields >

domains-multisite-custom

Site ID – The id you copy from “All sites” by clicking Edit to a site and copy id numerical digit from address bar.

Domain – Enter the domain address you want to use yo your multisite network site.

Primary - Check primary if you want to use custom domain as your website address(Don’t un-check).

Now you all set from your network dashboard its time to configure some things in your domain provider panel and your web hosting panel.

First open your web hosting c-panel and under domains > Select Parked domains > Enter domain address you input on “Domain” field in network admin > Settings > domain.

parked-domain

Next go to your domain registrar and update name servers of hosting account server where you parked your custom domain.

nameservers-godaddy

And you done now… ! Please wait for some hours or minutes your domain provider take time to take effect not work after some hours so the maximum time is 24 hours.

Manage site from network admin dashboard

When your custom domain site working so let us manage your site Info, Users, Themes & Settings through admin dashboard. This step learn you about custom domain multisite management that only handle by Network admin not Site admin.

Edit any site from network admin dashboard and Manage.

Info - In this tab don’t change any field if your site is working properly.

Users – Add users who can manage the site you currently edited.

Themes – Themes add from network admin menu not from site admin dashboard so add, enable or disable themes from this tab.

Settings – Settings contain all those field which are found in non-multisite dashboard settings.

Errors FAQ

Site not opening when i open my custom domain address ?

– Mostly this problem are persist when user not wait for some hours i suggest you to wait for 24 hours to take effect your domain provider.

Site working with custom domain but not loading files like Images, CSS and more ?

– Make sure your .htaccess file lines contains only those rules written on Network admin > Settings > Network setup.

My created site not showing shortcut in network admin Navigation bar ?

– Actually its not any error or problem don’t worry about because this feature is only available in past version of 4.0 so if you are using wordpress 4.0 or above then its not show in navbar you may open dashboard from All sites  of Super admin dashboard.

What’s the hell 500 ?

This comes when you add a custom domain in “Domains”. When i add domain address & side id and save is get 500 and after pressing refresh button my site again works properly so you can avoid this problem by parking domain address in your hosting server first than add Custom domain to Super-admin dashboard.