Setup WordPress Multisite Network with Domain Mapping and CDN

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

  1. First of all, initiate master WordPress installation from Apiqcloud Marketplace. This can be a cluster or standalone package.
  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.wprcluster.apiqcloud.net,
    site2.wprcluster.apiqcloud.net
  • sub-folders — a path-based network in which on-demand sites use paths:
    wprcluster.apiqcloud.net/site1, wprcluster.apiqcloud.net/site2

In this article, we will go with the 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. 

           

  1. Open My Sites > Network Admin > Sites page.
     
  2. 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.

  3. 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 cjiffy.website zone that will be mapped to three sites in the network like:

wprcluster.apiqcloud.net/ /site1 -> multi1.cjiffy.website

wprcluster.apiqcloud.net/ /site2 -> multi2.cjiffy.website

wpcluster.vip.apiqcloud.cloud/site3 -> multi3.cjiffy.website

  1. In order to bind a custom domain (e.g. multi1.cjiffy.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.



Note: Let's Encrypt has a set of limitations while issuing certificates. If they don't meet the requirements of your project, please consider using alternative SSL certificate authority.

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.cjiffy.website:

                           https://wprcluster.apiqcloud.net/site1/ -> multi1.cjiffy.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:
  • Enter the dashboard of each site by clicking on the Dashboard menu item.

  • Press LiteSpeed Cache and go to the CDN tab.
  • Paste the CDN URL from installation email or success window, and website Original URL (domain you previously bound, in this format: //multi1.cjiffy.website). Click Save Changes.
  • Repeat the same steps for each site in the network to bind a 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 Apiqcloud Multi-Cloud PaaS.

 

  • Setup WordPress Multisite Network with Domain Mapping and CDN, wordpress multisite, network with domain mapping, domain mapping and cdn
  • 0 istifadəçi bunu faydalı hesab edir
Bu cavab sizə kömək etdi?

Uyğun məqalələr

Container Redeploy

Update Container via Dashboard The most straightforward and user-friendly way to redeploy a...

Multiple Public IP Addresses for a Single Container

Multiple Public IP Addresses for a Single Container Apiqcloud PaaS supports assigning multiple...

How to Bind Custom Domain via CNAME

In order to bind custom domain name to such environment, a special CNAME (canonical name)...

How to Bind Custom Domain via A Record

  The majority of applications in production use an External IP address as more secure and...

DNS Hostnames for Direct Connection to Containers

Being able to easily connect to Cloud services is a criteria of great importance for all of the...