WordPress Multisite is one of the greatest features that allows having all your sites within one WordPress installation. It also has domain mapping feature that allows for mapping of domain to each multisite subsite. This implies that a WordPress subsite created either as subdomainsubsite1.netdomain.com or as a subdirectorynetdomain.com/subsite1 could be mapped to display as domaindomain.com. This tutorial shows you how to implement the domain mapping in a WordPress Multisite network.
- Fresh Install Linux Server (Ubuntu 18.04 or Centos 7)
- Already installed WordPress Multisite Network. If not yet, follow the instructions in our tutorial:How to Set Up WordPress Multisite on Ubuntu 18.04 with Apache Web Server
- Already set up domain(s) mapped to your DNS server for binding to the WordPress Subsites
Access the dashboard of your wordpress multisite installation
Navigate to My Sites > Network Admin > Sites
Then click on Add New
Enter the details as follows:
Site Address (URL): In our case, enter the sub-directory subsite name. Please note you are not allowed to enter the reserved subdirectory names which are sub-directories inside wordpress installation e.g. wp-admin, wp-content, e.t.c
Incase your installation has subdomain multisite in the format subdomain.netdomain.com, then enter the subdomain name in the field. Please note you are not allowed to enterwww. as part of the subdomain
Site Title: Enter title of the new subsite
Admin Email: Enter email of the admin of the subsite – if you’re a hosting provider, enter the email of your client or you can enter yours as the admin of the wordpress multisite installation.
Upon completion of entering the details in the respective fields, click Add Site button.
Map Domain to Subsite
Navigate to SitesUsing the mouse, hover over the subsite you’re interested in mapping domain on and click on Edit link to edit it. Edit the Site Address (URL) field and enter the domain you desired to map into the wordpress subsite. This domain must have already been mapped into your DNS servers. After applying the new domain name, click Save Changes to launch your website under new domain existing as a subsite in your wordpress multisite network installation.
Special Note: In case you encounter an error during log into your subsite with either no error message or error message related to blocking of cookies, access your wp-config.php file and add the line below:
As you can see, the WordPress multisite feature allows creation of several domain sites on a single wordpress installation. This helps saving costs of purchasing numerous/several hosting accounts for each domain you purchase. Another advantage as a super admin, is that you are able to manage all your wordpress sites from a centralized point of view and with the greatest ease.