WordPress Multisite lets one Agiler WordPress project serve a network of sites. WordPress manages each site’s address in its database, while Agiler connects the domains and provisions HTTPS. Adding a domain in Agiler does not create a site in WordPress; configure both sides for each address you want to use.
Prepare your project
Start with a working WordPress project. Before converting an existing site, create a backup and wait for it to complete. Keep a copy of wp-config.php as well. Test the conversion on a separate project before changing a live site.
Choose the network’s main address before setup. Connect that exact domain, verify HTTPS, and select it as the project’s Site Domain on the Domains page. Open WordPress through that address when creating the network.
WordPress offers two address layouts, subject to restrictions on existing installations:
| Layout | Example site address | Agiler domain setup |
|---|---|---|
| Subdomains | news.example.com | Add individual subdomains or a wildcard to the same project. |
| Subdirectories | example.com/news/ | Connect the shared hostname; paths do not need DNS records. |
Verify that permalinks work and deactivate active plugins before network setup. See the official WordPress network guide for installation prerequisites and restrictions.
Connect domains for a subdomain network
For a network whose main site is example.com and whose other sites use addresses such as news.example.com:
- Connect
example.comto the project and use it as the Site Domain. - Add
*.example.comon the same project’s Domains page. - Follow Configure wildcard DNS and add both CNAME records shown: one for traffic and one for certificate validation. Keep both records for certificate renewal.
- Wait for domain provisioning to succeed before testing the network.
The wildcard covers one subdomain level. It does not cover example.com or preview.news.example.com. A wildcard cannot be selected as the Site Domain, so keep the exact main hostname connected separately. Agiler permits an exact hostname and an overlapping wildcard on the same project. See Wildcard domains for details.
If you connect individual subdomains instead, connect each new site’s hostname to the project before using it. A wildcard routes matching addresses to the project, but you still need to add the corresponding sites in WordPress.
Check wp-config.php
Agiler creates WordPress configuration at /www/wp-config.php, shown as wp-config.php in the root of the project’s Files page. You need the Admin or Developer workspace role to change project files and domains. Preserve the database credentials, security keys, and other existing settings while making these changes.
New projects
New Agiler WordPress projects include this conditional block after the comment containing stop editing:
if ( ! defined( 'MULTISITE' ) || ! MULTISITE ) {
define( 'WP_SITEURL', 'https://' . $_SERVER['SERVER_NAME'] );
define( 'WP_HOME', 'https://' . $_SERVER['SERVER_NAME'] );
}
Leave this block in place. When the network’s MULTISITE constant is defined as true before this block runs, Agiler’s single-site URL overrides are skipped and WordPress can use the network’s stored site addresses.
Existing projects
Older projects may define WP_SITEURL and WP_HOME without the conditional block. Remove those two definitions before creating the network. Review the file itself rather than assuming an existing project has the new configuration.
Do not add a second set of URL definitions elsewhere in the file. Unconditional overrides prevent WordPress from using each network site’s own configured address.
Create the network
Follow the WordPress network setup instructions using your installation’s generated values:
- Add
define( 'WP_ALLOW_MULTISITE', true );above thestop editingcomment inwp-config.php. - Refresh WordPress, open Tools → Network Setup, choose the available address layout, review the network details, and click Install.
- Add the generated network constants to
wp-config.phpin the same custom-settings section. On Agiler,MULTISITEmust be defined before the URL conditional block described above. - Review the remaining installation-specific instructions. If they require web-server rewrite changes, contact us for the Agiler configuration before proceeding.
- Sign in again and open My Sites → Network Admin to manage the network and add sites.
Use the values generated for your installation, particularly its domain and path, rather than copying another network’s constants.
Verify the network
Create a test site and check its homepage, an individual post, its admin area, and a media upload over HTTPS. Confirm that links and redirects stay on the intended site’s address. Check the main site again before re-enabling plugins and testing them with the network.
If a subdomain cannot be reached or has a certificate error, check its Agiler domain status and DNS using Domain troubleshooting. If requests reach WordPress but redirect to the wrong site, check the network’s stored addresses and the placement of the MULTISITE, WP_SITEURL, and WP_HOME definitions.
All sites remain part of one Agiler project. Keep project backups enabled and account for the whole network when planning a restore.