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:
- Download WordPress from wordpress.org.
- Upload it to your hosting server using FTP or File Manager.
- Create a database in your hosting account (like cPanel).
- 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:
- 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);
- 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.
- In your WordPress dashboard, go to Tools > Network Setup.
- 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).
- Since we are setting up different domains for each site, choose the subdomains option.
- Name your network and enter your network admin email.
- 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:
- Open your wp-config.php file again.
- Add the code snippets from WordPress right below the line where you added WP_ALLOW_MULTISITE.
- Open your .htaccess file (also in the root directory).
- 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.
- Download and install the WordPress MU Domain Mapping plugin from the WordPress repository or upload it manually.
- 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’);
- 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:
- First, add a new site to your network by going to Network Admin > Sites > Add New.
- After creating the site, go to Network Admin > Settings > Domains.
- 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.
- Go to the domain registrar where you bought the domain (e.g., GoDaddy, Namecheap).
- Find the DNS settings and update the A Record to your hosting server’s IP address.
- 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.
- Visit the new domain to check if it’s correctly mapped to the site.
- Log in to the WordPress dashboard of the new site to ensure everything is running smoothly.
- 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.