In this article we explain how to map custom domains to your WordPress Multisites using the WordPress MU Domain Mapping plugin.

Mapping custom domains to your sites makes it easier for your visitors to find your website, improves search engine ranking and makes your websites look more professional.

The steps below work for both subdomain and sub-directory Multisite installs. We’ll show you how to install and configure the WordPress MU Domain Mapping plugin and how to add a domain to your cPanel account and map it to your WordPress Multisite.

Install WordPress MU Domain Mapping plugin

  1. Log in to your WordPress Dashboard
  2. Click My Sites > Network Admin > Plugins
  3. Click Add New
  4. Search for WordPress MU Domain Mapping
  5. Click Install Now
  6. Click Network Activate
  7. Copy sunrise.php from the wordpress-mu-domain-mapping plugin directory to your wp-content directory using cPanel File Manager.
  8. Edit your wp-config.php file and add the following line above ‘That’s all, stop editing!’
define( 'SUNRISE', 'on' );

Configure Domain Mapping Plugin

  1. Log in to your WordPress Dashboard
  2. Click My Sites > Network Admin > Settings > Domain Mapping
  3. Enter the IP Address of your Ecenica web hosting package’s server. The IP is in your Welcome Email or cPanel.
  4. Check the following:
    • Remote Login: Enabled
    • Permanent redirect: Enabled
    • User domain mapping page: Enabled
    • Redirect administration pages to the site’s original domain name (remote login disabled if this redirect is disabled): Enabled
    • Disable primary domain check. Sites will not redirect to one domain name. May cause duplicate content issues: Disabled
  5. Click Save

Map a domain to your WordPress Multisite

  1. Register your new domain. Try our free domain checker
  2. Log in to cPanel
  3. Add your new domain as a alias domain
  4. Log in to your WordPress Dashboard
  5. Access the WordPress dashboard for site you wish to map using My Sites > Network Admin > Sites then click the Dashboard link under the site domain.
  6. Click Tools > Domain Mapping
  7. Enter the new domain. Click Add
  8. Select the new domain and click Set Primary Domain

Bug Fix

If you have added WPMU Domain Mapping plugin but cannot add domains, please run the following SQL command in PhpMyAdmin

CREATE TABLE IF NOT EXISTS `wpXX_domain_mapping` (
	`id` bigint(20) NOT NULL auto_increment,
	`blog_id` bigint(20) NOT NULL,
	`domain` varchar(255) NOT NULL,
	`active` tinyint(4) default '1',
	PRIMARY KEY  (`id`),
	KEY `blog_id` (`blog_id`,`domain`,`active`)
) ENGINE=InnoDB;

Please change wpXX_domain_mapping to use your table prefix.