wordpress multisite

How to Create a WordPress Multisite with Different Domains

Creating a Multisite is helpful to get the most out of a server if you have more than one website identical to the same plugin and themes. However, Multisite is very challenging for different clients to manage. If one goes down, all will go down. If one gets hacked, all will be impacted. It’s better to create a multisite if all websites are identical and share the exact nature of business. If you want to create a multisite in WordPress, you can easily configure it with this guide.

Here, I’ll explain the steps so you can easily follow along. 

What is WordPress Multisite?

WordPress Multisite is a feature in WordPress that allows you to create a network of websites using one WordPress installation. This means you don’t need separate WordPress setups for each site. You can control and manage all your sites from one dashboard. It becomes essential when you have multiple domains with the same set of businesses, like a travel company having the same plugin and theme but for different countries and restaurant websites for different countries. In this case, using multisite is beneficial for managing from one dashboard, but if the nature of the business is different and built on different themes or different clients. It can become a headache and time-consuming task. 

Benefits of WordPress Multisite

  • Manage multiple sites from one dashboard.
  • Add new sites quickly without setting up a fresh WordPress installation.
  • Use the same themes and plugins across all your sites.
  • You can assign different domains to different sites in the network.

Now, let’s set up WordPress Multisite with different domains.

Step 1: Install WordPress

If you haven’t installed WordPress, the first step is to do so. Most hosting providers offer one-click WordPress installation. Here’s how you can install WordPress manually:

  1. Download WordPress from wordpress.org.
  2. Upload it to your hosting server using FTP or File Manager.
  3. Create a database in your hosting account (like cPanel).
  4. Connect WordPress to the database during the installation process by entering your database name, username, and password.

You can enable the Multisite feature once WordPress is installed and set up.

Step 2: Enable WordPress Multisite

WordPress Multisite is not enabled by default. You need to activate it manually by making a small change to your WordPress configuration file.

Here’s how you can do it:

  1. Open your wp-config.php file in the root directory of your WordPress installation using FTP or File Manager.

Add the following line of code just above the line that says /* Blog*/:

define(‘WP_ALLOW_MULTISITE’, true);

  1. Save the file.

After saving, go back to your WordPress dashboard. You’ll see a new option in the tools menu called Network Setup.

Step 3: Set Up the Multisite Network

Now that Multisite is enabled, setting up your network is time.

  1. In your WordPress dashboard, go to Tools > Network Setup.
  2. You’ll have two options for your Multisite setup:
    • Subdomains: Each site will have its subdomain (e.g., demo1.flawlessthemes.com, demo2.flawlessthemes.com).
    • Subdirectories: Each site will have its directory (e.g., flawlessthemes.com/theme1, flawlessthemes.com/theme2).
  3. Since we are setting up different domains for each site, choose the subdomains option.
  4. Name your network and enter your network admin email.
  5. Click on Install.

Step 4: Configure wp-config.php and .htaccess

After setting up the network, WordPress will give you some code snippets to add to your wp-config.php and .htaccess files. Follow these steps:

  1. Open your wp-config.php file again.
  2. Add the code snippets from WordPress right below the line where you added WP_ALLOW_MULTISITE.
  3. Open your .htaccess file (also in the root directory).
  4. Replace the existing code with the new code snippet provided by WordPress.

After this, log out and log back into your WordPress dashboard to complete the network setup.

Step 5: Install the Domain Mapping Plugin

You need a domain mapping plugin since you want to use different domains for each site. One of the best options is the WordPress MU Domain Mapping plugin. There are other plugins as well, but let’s use this to see how it works. Our developer tested it, so we know it works well. 

  1. Download and install the WordPress MU Domain Mapping plugin from the WordPress repository or upload it manually.
  2. After installation, you must move a file called sunrise.php from the plugin folder to the wp-content folder. This file helps with domain mapping.

Open your wp-config.php file again and add the following line right after the Multisite activation lines:
define(‘SUNRISE’, ‘on’);

  1. Go to Network Admin > Settings > Domain Mapping and configure the plugin settings.

Step 6: Add Different Domains to Your Sites

Now that you’ve installed and configured the domain mapping plugin, you can add different domains to each site. Here’s how:

  1. First, add a new site to your network by going to Network Admin > Sites > Add New.
  2. After creating the site, go to Network Admin > Settings > Domains.
  3. Add the domain you want to use for the new site. For example, if you have a second domain like newdomain.com, you’ll map this domain to the site you just created.

Step 7: Point Your Domains to Your Server

For domain mapping to work, you must point each domain to your hosting server by updating its DNS settings to point to your hosting server’s IP address.

  1. Go to the domain registrar where you bought the domain (e.g., GoDaddy, Namecheap).
  2. Find the DNS settings and update the A Record to your hosting server’s IP address.
  3. Allow some time for the changes to propagate.

Once the DNS is updated, your new domain will be mapped to the site in your WordPress Multisite network. If you need help setting up Cloudflare, check out this article. 

Step 8: Test Your Multisite Setup

After completing the steps, you should test everything to ensure it works as expected.

  1. Visit the new domain to check if it’s correctly mapped to the site.
  2. Log in to the WordPress dashboard of the new site to ensure everything is running smoothly.
  3. Test any plugins or themes you’ve installed to ensure they are compatible with Multisite.

Managing Your Multisite

Once your WordPress Multisite is up and running with different domains, managing it is straightforward. You can easily switch between sites in the network from the Network Admin dashboard.

  • Go to Network Admin > Sites > Add New to add a new site.
  • To manage the domains for a specific site, go to Network Admin > Settings > Domains.

You can also assign different users to manage specific sites. This is useful if you want someone else to manage one website while you handle others.

Final Thoughts

WordPress Multisite is a powerful tool for managing multiple websites. With the ability to use different domains for each site, you can build a network of websites without the need for multiple installations with multiple servers, as a sound server can handle multiple domains simultaneously. Whether you’re a developer who wants to manage multiple clients or a website owner looking to expand your online presence, WordPress Multisite simplifies managing multiple domains from one dashboard. However, multisite always comes with the risk we covered in this post.