While running several websites, it can be more useful to go with WordPress multisite network than managing a number of standalone WordPress sites:
- You can easily manage multiple sites from a single dashboard
- Other users can be added as admins with limited access only to a specific site
- New plugins and themes can be installed and activated for multiple sites at once
- Updates should be performed only on master installation and will be automatically applied for all websites in the network
- Each website or blog can be customized separately thus they are not limited by unified management
This implementation can be of a great use for various industries and types of organizations with own sites: media resources with a number of sections managed by different teams; government and non-profit sites for different departments or locations; educational organizations with sub-sites created by students; business website with sub-categories for different branches; private blogs on multiple subdomains, and others.
Multisite network is a built-in feature in WordPress that can be easily activated but at the same time it requires a set of configurations for proper work. In this article, we will describe how to create multiple websites, bind custom domains, issue SSL certificates and integrate CDN in a few minutes using a single WordPress installation.
Install WordPress and Enable Multisite Mode
2. Enable the required Advanced Features including “Install WordPress Multisite Network” option and proceed to environment installation:
For this article, we create WordPress based on LiteSpeed servers and MariaDB Galera, as well as with enabled WAF, Let’s Encrypt SSL and Multisite Network.
Configure Multisite Network and Create Website
After installation, multisite mode is automatically enabled and the websites can be created in one of the following ways within a single network:
- sub-domains — a domain-based network in which on-demand sites use subdomains: site1.wpcluster.vip.jelastic.cloud, site2.wpcluster.vip.jelastic.cloud
- sub-folders — a path-based network in which on-demand sites use paths:
In this article, we will go with sub-folders model for our WordPress multisite network subsites.
1. Log in to your WordPress Admin Panel using the credentials from the post-installation email or WordPress successful installation window.
2. Open My Sites > Network Admin > Sites page.
3. This is the page with all sites of your WordPress Multisite Network. Now, there is the main site only created by default. Click on Add New.
4. Fill out the form specifying the Site Address (URL), Title, Language and Admin Email. Click on Add Site.
Congratulations! You have created and configured the first website within your WordPress Multisite Network. Repeat the same steps to create additional sites when required.
Bind Custom Domains to Websites in the Network
Below we’ll demonstrate how to map a custom domain to a default one in the multisite network.
For our example, we have registered three custom domains in jele.website zone that will be mapped to three sites in the network like:
wpcluster.vip.jelastic.cloud/site1 -> multi1.jele.website
wpcluster.vip.jelastic.cloud/site2 -> multi2.jele.website
wpcluster.vip.jelastic.cloud/site3 -> multi3.jele.website
1. In order to bind a custom domain (e.g. multi1.jele.website) to a newly created site:
- create an A record for your custom domain that will map it to the public IP address of Load Balancer
- find the Let’s Encrypt Free SSL Add-On in the Load Balancer, press Configure button, add your custom domain to the list of registered domains for your web sites
2. Go back to the list of the available sites and click on Edit next to the required one.
3. Change the Site Address (URL) with a custom domain multi1.jele.website:
wpcluster.vip.jelastic.cloud/site1 -> multi1.jele.website
4. Press Save Changes. Repeat the same steps to bind domains for each required sub-site.
Enable CDN for Websites in the Network
Finally, you have to bind a CDN endpoint to each site of the just created network. It may be done in two different ways depending on what application server you chose at WordPress installation step.
1. If you have LiteSpeed-based WordPress installation:
- First, activate the LiteSpeed Cache plugin for your network.
- Then enable plugin on Cache settings page
Click ON for the Network Enable Cache and Save Changes.
- Enter the dashboard of each site by clicking on the Dashboard menu item.
- Press LiteSpeed Cache and go to the CDN menu item.
- Paste the CDN URL from installation email or success window, and website Original URL (domain you previously bound, in this format: //multi1.jele.website). Click Save Changes.
- Repeat the same steps for each site in the network to bind the CDN.
2. If you have NGINX-based WordPress installation:
- Open Performance > General Settings > CDN within WordPress admin panel.
- Pick Enable checkbox for CDN, choose Verizon Digital Media Services (Edgecast) in CDN Type field and press Save all settings.
- After that, the warning will appear requiring fill out the “Replace default hostname with” field. Click on the link Specify it here.
- Replace site’s hostname with CDN endpoint hostname you have obtained upon WordPress installation (e.g. wpcluster-demo.cdn.edgeport.net) and press Save all settings.
- Unlike the LiteSpeed-based installation, you do not have to configure CDN for each site. From now on all of the newly created websites in the network will be served by CDN.
Congratulations! Your WordPress multisite network is configured inside a highly-available cluster, sub-sites are created with custom domains and enhanced by enterprise-level CDN. Enjoy a unified management of your websites and blogs using Jelastic Multi-Cloud PaaS.