Getting Started with WordPress Multi-site Network :
WordPress is the most widely used platform for creating both websites and blogs. One of the great features of WordPress is that it has a capability called Multi-site. available. For example, If you own many blogs or WordPress websites and wish to manage them all from a single account, you may create a multi-site network using WordPress.
You may easily add new websites or blogs to your multi site network using your domain name.
When and why should a multisite network be used
The following are some instances when it makes sense to use a WordPress multisite network:
Advantage of Using a Multi-Site Network
Disadvantage of Using a Multi-Site Network
Before we begin, I need to mention that in order to enable WordPress Multi-Site, you will need and FTP client. FTP clients are applications that allow you to connect to your hosting provider and access your server files.
There are many FTP clients for both Macs and Windows. Some are free, while other cost a small amount of money. I personally have a Mac, and I use the most popular FTP client for Macs which is a paid application called Transmit. They offer a free 1 week trial and I highly recommend it.
if you are on a tight budget you can either use FileZilla or Cyberduck, they work on both both Windows and Macs and are Free.
The Last Thing You Need To Do Before Enabling The WordPress Multi-Site option
Before we enable the WordPress Multi-Site feature with with Sub-domains:
example (https://Russian.mylazycat.com or https://French.mylazycat.com)
Both the subdomains and sub-directories have their own individual requirements.
Example of a sub-directories : (https://mylazycat.com/Russian or https://mylazycat.com/French )
To enable WordPress Multi-Site For Subdomains, you’ll need to set up a wildcard subdomain.
To do that, simply log into the Hosting Providers Dashboard. Under the Domains section, you’ll need to click on the ‘Subdomains’ option and add an asterisk *
Look at the corresponding image to show you how to complete this step.
1. Installing WordPress Multi-Site
If you are enabling WordPress Multi-Site on a brand new website, then you will need to install WordPress first.
Most WordPress hosting companies, including the three recommended by WordPress.org come with 1-click WordPress installer.
When installing WordPress for the very first time, you are presented with a check box, prompting you, if you want to enable Multi-Site. Please check off that box just before you click install WordPress.
In case you have WordPress already installed, and did not select the Multi-Site Option at the time of the installation, you have nothing to worry about. In the next step I will show you how to enable WordPress Multi-Site on an already installed WordPress instance.
Enabling WordPress Multi-site Feature for a site that initially installed the WordPress instance without selecting the Multi-Site option. (Please note: the next step is only necessary if you did not originally select the Multi-Site option when you first installed WordPress.
Once you FTP or SFTP into your host provider, you will need to modify the wp-config.php file
Inside this file, you will need to add the following line which is highlighted in blue just above the line that says ‘That’s all, stop editing! Happy publishing’.
define( ‘WP_ALLOW_MULTISITE’, true );
Once you have added the new line of code, don’t forget to save your changes and upload the file back to your website. (If using an FTP Client such as Transmit, the application will prompt you if you want to save and upload your changes once you close the window.)
Now you need to log back in to your WordPress admin dashboard and reload the admin dashboard page.
After that you will need to visit MY SITES >NETWORK ADMIN> SETTINGS and then under SETTINGS select NETWORK SETUP
On the Network setup screen, for the users that did not originally install WordPress with the multi site option and had to enable it by modifying the wp-config.php file as we just did in the step above, those users will be presented with a page where they will have to choose between Sub-Domains or Sub-Directories. In this example we will be using Sub-Domains.
Again Sub-Domains examples are Russian.mylazycat.com Or French.mylazaycat.com
While Sub-Directories are mylazycat/Russian or mylazycat.com/French
Once you make the choice between Subdomains or Sub-directories, it is time to move to the next step.
Step 2. Network Setup, Inserting Code To Enable WordPress Multi-Site
Please note: In this step you have to add 2 additional sections of code. This step is Mandatory for both users who initially installed WordPress and selected the Multi-Site option as well as the users that had to enable the Multi-Site feature, after the fact just like we did in the step above.
2A.The first section of code will go into your
wp-config.php file just above the line reading ‘That’s all, stop editing! Happy publishing’ .
In addition to the code shown by WordPress, you also need to add the following line to your wp-config.php file. This line ensures that users can login to each site.
define(‘COOKIE_DOMAIN’, $_SERVER[‘HTTP_HOST’] );
2B.The second piece of code goes into your WordPress .htaccess file replacing the default WordPress . htaccess rules.
Make sure you save your file and upload it back again to your hosting provider. If you are using Trasmit as your FTP client, all you have to do once done inserting the code, close out the window and Trasmit will ask you if you want to save and upload. Select Yes.
Please note, you might have problems finding the .htaccess file since it is usually hidden. All you have to do to display the file is by using your FTP client, you should have an option to display hidden files from the menu bar. In transmit it is under the View option .
Once you have added both sections of code to the respective files, save your work. You will then need to login to your WordPress admin dashboard.
Step 3. Adding Your Site(s) To WordPress Multi-Site
Begin by selecting My Site > Network Admin > Sites
On the Top right next to the word Sites, select the “Add New” box
Proceed by Populating the following fields: 1. Site Address URL, 2.Site Title, 3.Admin Email. Please note for the Site Address field, this is not where you will map the correct domain name to your site. We will do this in Steps 4 & 5 as shown in the images below.
From the WordPress dashboard, select Sites and proceed to click on the edit icon for the site you have just created.
This step is extremely important. Here for Site Address you will need to type in your domain name exactly how it is show in the Site Address field. For example if you Sub-Domain name for your new site is Russian.lazycat.com you will have to put in https://Russian.lazycat.com
This is where WordPress does its Domain mapping and after typing in your new Sub-Domain name make sure to save it. Once complete you will have mapped your domain name for when a visitors types in the URL, they will be taken to your new site.
This brings us to the end of how to enable a Multi-Site Network in WordPress
However, I want to share with you something else you need to do or you will run into problems. If you have enabled the WordPress Multi-Site network and created Sub-Domains for your site such as Russian.mylazycat.com or French.mylazycat.com you will need to add them to your Parked Domains.
Most WordPress hosting providers allow you to easily add multiple domains to your hosting account.
If you are using SiteGround, then click on the Site Tools under your hosting account.
After that, you need visit Domains » Parked Domains and then add your custom domains here.
Repeat the process if you need to add more custom domains.
If you are using another hosting service, then the process is still the same. You’ll find the parked domain option under the Domains section of your hosting dashboard.
Please Note: the step is extremely important, adding a parked domain will allow you to make changes to your website and have those changes visible to your viewers.
In addition, you will need to flush out the cache, each time you make changes to your website or else those changes will not show up or be visible to your visitors. (In the next section we will show you how to automate the flushing out the cache process.)
It is burdensome to flush the cache manually each time you make changes to your website. To fix that problem, For those users who use SiteGround as their hosting provider you will need to install the SG Optimizer Plug-in which is a SiteGround Hosting specific Plug-in.
Once The Plug-in is installed and enabled at the Network level, activate it for each individual Sub-domain and turn on the ‘Automatic Purge ‘ option which will automatically flush the cache each time you make changes to your website.
If you are not using SiteGround as the hosting provider, or not using the SiteGround SG Optimizer Plug-in, there are a multitude of other caching plug-ins on the market, which will automatically flush the cache each time you make changes to your website.All you need to do is select a caching plug-in and enable the automatic purge option for each Sub-Domain your site has.