Multisite
Creating a multisite application
WordPress multisite lets you run multiple WordPress sites with shared plugin and theme files, which can be useful for models such as offering market-specific experiences
WordPress offers detailed documentation on setting up multisite which can be a useful reference, but we'll cover all the necessary steps here.
Setup
First, set up your main domain name for your network. Network configuration won’t work with your prelaunch applicationname.tangiblelaunchpad.com domain.
The "main site" in a WordPress Multisite network is the primary, original website created during installation, from which all other subsites in the network are managed.
Option 1: WP-CLI (recommended)
If you have WP-CLI access, you can enable and configure multisite with a single command:
wp core multisite-convert --subdomains
This handles all the necessary wp-config.php changes for you. Once complete, reload the site and your multisite network is ready.
Option 2: Manual configuration
Edit wp-config.php and add this line above where it says /* That’s all, stop editing! Happy publishing. */. If it doesn’t say that anywhere, then add the line somewhere above the first line that begins with require or include:
/* Multisite */
define( ‘WP_ALLOW_MULTISITE’, true );
If you don’t know how to edit files on your application, you can read more about that in our Accessing files via FTP/SFTP documentation.
This new definition enables multisite, and will add a "Network Setup" item to the "Tools" menu in your WordPress admin area. Click on the new navigation item, and fill out the required details (Network Title, and Network Admin email).
In the next step, you can safely ignore the message you’ll see regarding nginx configuration. Follow the on-screen steps to update your wp-config.php file once again.
Make sure that the SUBDOMAIN_INSTALL definition is set to true:
define( ‘SUBDOMAIN_INSTALL’, true );
Save your changes to wp-config.php and reload the site. That’s it! You now have a multisite!
If you need more info about managing a multisite network, you can learn more in WP’s documentation about multisite administration.
TXP currently doesn't currently support sub-directory configuration for multisite, but this is on our roadmap so get in touch with support if this is something you need.
DNS configuration for subsites
Before adding subsites, create a wildcard CNAME record for your network domain. This covers all current and future subdomains in a single step:
In your DNS panel for the network domain, create a CNAME record for * pointing to lb.tangiblexp.com.
With this in place, you won't need to make any additional DNS changes when adding new subsites.
Adding a sub-site
- Navigate to "My Sites" -> "Network Admin" -> "Sites" in your WP Toolbar.
- Click "Add site" and fill out the provided form.
- Navigate to your application in the TangibleXP panel, then to the "Domains" submenu item in the sidebar.
- Click "Add domain" and enter the subdomain you created in step 2.
Domain mapping
Subsites on a WP multisite network can be mapped to an external domain. This means a site created as networksite.networkdomain.com can be mapped to show as mydomain.com.
WordPress Admin configuration
To map an external domain to one of your network sites:
- Navigate to "My Sites" -> "Network Admin" -> "Sites" in your WP Toolbar.
- Click "edit" on the site you'd like to map (this won't work for the main site).
- Enter the domain in the "Site Address (URL)" field in the first "Info" tab of the site edit screen.
You'll need to enter a subdomain during the creation process as the form requires it, but you don't need to do any DNS configuration at that stage. Simply create the site with any available network subdomain, then adjust the domain to the one you want to use as described above.
DNS Configuration
- In your DNS panel for the external domain, create a CNAME record pointing to
lb.tangiblexp.com. If you're mapping an apex domain (e.g.mydomain.comrather thanwww.mydomain.com), you'll need to use a DNS provider that supports CNAME flattening at the apex (such as Cloudflare). - Navigate to your application in the TangibleXP panel, then to the "Domains" submenu item in the sidebar.
- Click "Add domain" and enter the domain you configured in the WP admin configuration steps above.