This post will walk you through setting up a WordPress Multisite with different domains. The idea is to manage, with a single WordPress install multiple sites with different domains: e.g.
mysite.com mysite.store other.com.
Table of Contents
- Set up WordPress Multisite with domains in just five steps
Set up WordPress Multisite with domains in just five steps
Still haven’t made the decision to utilize subdirectories, subdomains, domains or even multisite? Take a look at this compendium of Conditionals and a list of Good and Bad Parts, to help you decide.
1 Start from a standard WordPress site
WARNING: do not experiment with your production site!
Work in a Staging clon, or launch a clean WordPress site. Both options take a few seconds to launch with Wetopi Specialized Managed Hosting. Watch this video (20 seconds) that describes how to Stop breaking your live WordPress.
If your hosting does not provide staging,
invest 10 seconds to:
Once our standard WordPress site is up and running, we are ready to enable the WordPress Multisite with Sub-domains mode.
YES, Multisite with Sub-domains!
It may sound weird, but domain mapping works with the same WordPress Subdomain mode.In WordPress 4.5, Native Domain Mapping was added to WordPress core.
Before WordPress 4.5, domain mapping required a domain mapping plugin like WordPress MU Domain Mapping. Since WordPress 4.5+, domain mapping is a native feature.
2 Enable Multisite mode
To do this, you need to modify the WordPress configuration: wp-config.php.
Log into your server using an ftp client and open the wp-config.php with your favorite text editor.
At wetopi, we use secure SFTP. It is the same as ftp but the connection is secure and information travels encrypted. If you are running a wetopi server, you’ll find the SFTP credentials in the Options menu → Advanced section of your Wetopi WordPress server:
This capture of an SFTP client shows the
wp-config.php file inside the html dir:
Once opened with your preferred editor, locate at the end the bit that says:
/* That's all, stop editing! Happy blogging. */
And above the line shown above, add the following lines:
/** Multisite */ define('WP_ALLOW_MULTISITE', true);
Once it is saved, go back to your WordPress to enable the Network.
3 Network Setup
If we refresh our admin page, we should now find the Network Setup link under the Tools menu:
In this new Network Setup section, we decide if we want to install Multisite to work with Sub-domains or Subdirectories. In our case, we check the Sub-domains option. Yes! It is not an error. WordPress multisite works with domains as if they where subdomains.
Then, click on the Install button.
4 Enabling the WordPress Network
Once clicked the “Install” button, WordPress will generate a few configuration lines to add in wp-config.php and .htaccess.
If you are working with Wetopi servers, you are running with Nginx. In that case, you don’t have .htaccess, but don’t worry! Wetopi Nginx servers are ready to work with WordPress Multisite, so you don’t have to play around with server configurations 🙂
NOTE: you can get the full details on how to configure Nginx for Multisite with domains in the official WordPress.org
Warning! Wildcard DNS may not be configured correctly!
When WordPress installs the Multisite, it will do some validations and probably return an error about a missing “wildcard domains”. You can ignore this warning. What you will have to do when working with different domains, is to point all of them to your server addresses.
In this how-to, we are using two domains:
sitamet.com. As an example, Wetopi shows you how to configure the DNS zones from its panel:
Let’s go back to the wp-config.php, and add the prompted lines shown in step 1 in the WordPress panel:
define('MULTISITE', true); define('SUBDOMAIN_INSTALL', true); define('DOMAIN_CURRENT_SITE', 'wpviva.com'); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1);
This is what we ended up having in our wp-config.php:
/** Multisite */ define('WP_ALLOW_MULTISITE', true); define('MULTISITE', true); define('SUBDOMAIN_INSTALL', true); define('DOMAIN_CURRENT_SITE', 'wpviva.com'); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1); /* That's all, stop editing! Happy blogging. */
Once, changes in the wp-config.php are saved, the WordPress network is enabled and configured. You only have to log in again.
In your WordPress Dashboard, you should see the new “My sites” section.
Now, the WordPress Multisite with domains feature has been enabled and configured. But lets see how to add a new site under its own domain.
5 Adding a site with its own domain
Let’s go to the Sites Dashboard and click the Add New button to assign a new site to our WordPress Network.
Now pay attention
You must assign a temporary Subdomain before WordPress gives you the option to put a full domain.
Once you have added the New Site, with its temporary “Site Address”, go back to Sites and “Edit” the site again:
Now, you can replace the temporary Site Address (URL) with your full domain. In our case we put the
Then Save Changes and done! Your WordPress Multisite has two different domains:
If your DNS Zones have been properly pointed to your server, you should be able to jump to the other domains.
This is all. Your single WordPress Multisite install can manage multiple sites with different domain names.
We are techies passionate about WordPress. With wetopi, a Managed WordPress Hosting, we want to minimize the friction that every professional faces when working and hosting WordPress projects.
Not a wetopi user?
Free full performance servers for your development and test.
No credit card required.