Set up a WordPress multisite
Want to run a WordPress network of sites from a single WordPress installation?
This article describes the Cyberfusion side — the virtual host, its aliases, and SSL. The WordPress side (enabling multisite in wp-config.php, the Network Setup screen, plugin choices) is covered in WordPress's own documentation.
Pick the multisite layout first
WordPress multisite supports three layouts. Each one needs different hostnames on the virtual host:
- Subdirectory — sites live at
example.com/site-a,example.com/site-b. No aliases needed. The single primary domain on the virtual host is enough. - Subdomain — sites live at
site-a.example.com,site-b.example.com. You need a wildcard alias (*.example.com) so every subdomain hits the same virtual host. - Domain mapping — each site has its own domain (
site-a.com,site-b.net). Add each domain as a separate alias on the virtual host.
The rest of this article assumes you've already created the virtual host for your primary domain. See All about virtual hosts.
Add the aliases
Aliases are added on the virtual host's detail page. There are two ways to get there.
Directly
- Navigate to 'Advanced' > 'Virtual Hosts'.
- Select the virtual host.
Via the project
- Navigate to 'Projects'.
- Select the project.
- Navigate to 'Advanced'.
- Under the 'Virtual Host' tile, click 'Manage'.
Add each alias
Once you're on the virtual host's detail page:
- Next to 'Aliases', click the '+' button.
- In the 'Add Alias' dialog, enter the hostname in the 'Domain' field.
- Click 'Add'.
Repeat for each alias you need.
Wildcards
For a subdomain multisite, enter *.example.com (replace example.com with your domain) as the alias. One wildcard alias covers every subdomain — you don't have to add each site individually.
Rules:
- The
*must be the only character before the first dot.*.example.comis valid;*sub.example.comandsub.*.example.comare not. - Only one
*is allowed per alias. - The alias still has to be unique across all virtual hosts and URL redirects on the cluster — see the uniqueness rules.
The 'Add www' toggle
The 'Add Alias' dialog has an 'Add www' toggle. Turn it on to also add the www. version of the alias in the same submit. For a multisite, leave it off — www.*.example.com isn't a valid hostname.
DNS
Point each multisite hostname at the cluster:
- Subdirectory — only the primary domain needs a record.
- Subdomain — add a wildcard DNS record (
*.example.com) so every subdomain resolves to the cluster. Without this, sub-sites won't resolve at all. - Domain mapping — add a record for each mapped domain.
SSL
How you get HTTPS depends on the layout.
Subdirectory or domain mapping
Use a Let's Encrypt certificate manager covering the primary domain and any mapped domains. See Let's Encrypt certificates.
Subdomain (wildcard)
Let's Encrypt certificate managers in Cyberfusion don't accept wildcard domains in their 'Common Names'. For *.example.com you need a paid wildcard certificate. See Paid SSL certificates.
Once you have the wildcard certificate uploaded, attach it to the domain router for *.example.com. The wildcard router covers every subdomain that doesn't have a more specific domain router of its own.
WordPress-side configuration
Cyberfusion serves whatever WordPress sends back — the multisite settings (subdomain vs subdirectory, network admin, mapped-domain plugins) live entirely inside WordPress. Follow WordPress's Create A Network guide for the wp-config.php constants and the Network Setup steps.
The cluster's CMS detection will register the install as WordPress automatically once wp-includes/version.php appears under the document root — see Automatic CMS detection.