Multisite Domain Mapping and Configuration
What kind of multisite?
A multisite can have either subdirectory or a subdomain structure.
Subdirectories:
- example.com/subsite
- example.com/anothersubsite
Subdomains:
- subsite.example.com
- anothersubsite.example.com
Multisite with subdirectories
If a multisite installation uses subdirectories, each of the subsites can be mapped with its own domain. Remember to define this domain in the Siteurl and Home fields in the individual subsite settings.
If the subsites already have content and links, the address structure must be updated in the sites' database, search-replace command. You can use Seravo Plugin's features to run this command.
Multisite with subdomains
If a multisite uses subdomains, it can also be configured ("mapped") to use separate domains for the subsites. This is possible with an additional plugin called Mercator. However, you don't need to install it yourself – Seravo will configure it for you when converting your WordPress into a network, get in touch with us to get started! Once Mercator has been activated, "All sites" will show a new column, "Aliases".
In the picture below, in the leftmost column, "URL" must always show the actual subdomains however, in order for the site cookies to function properly.
Also the subsite's Site Address (URL) setting must always show the subdomain.
The separate domain must be defined as an Alias, and must of course be marked as active. Do note that while several aliases can be added, it is recommeneded to have only one active alias. If the intention is to direct several additional domains to a multisite subsite, it is recommended to use an Nginx redirect instead.
Once a domain has been defined as an Alias for a subsite, it must also be configured as the subsite's Siteurl and Home (see the "Settings" tab).
How do I publish a multisite?
Publishing a multisite differs from a normal site publication in certain aspects. Unlike usual, in a multisite, it is recommended to change the addresses in the database manually in advance using search-replace. In addition, the address must also be changed to the wp-config.php file, which can be found on the server from path /data/wordpress/htdocs/
. The file contains a number of multisite-related configurations, one of which is the site's URL. The line to be edited is as follows:
define( 'DOMAIN_CURRENT_SITE', 'example.fi-c.seravo.com' );
Replace the development address with the new primary domain and save the change. After the change, the site will no longer be accessible through a browser until the primary domain has been redirected to our server via DNS and it has updated. Nevertheless, it is recommended to do DNS changes only after the other changes, as this allows our publishing automation to generate the certificate automatically and thus any downtime related to the publishing is minimized. If the domain starts redirecting to our server before the addresses have been changed in the database and in the wp-config.php
file, the site will be unavailable until both changes have been made.
In case you have any additional questions or encounter problems during the publishing process, just contact our customer support!
I wish to make my WordPress a multisite. How to proceed?
If you want to turn your site into a WordPress network so that you can create a multisite, please contact Seravo's customer service, help@seravo.com.
Non-multisite WordPress
Are you looking for the instructions for how to configure a domain in a normal WordPress installation? See our instructions for non-multisite WordPress..