Setting Up WordPress Multisite on a Subdomain

When working with WordPress Multisite, you can set them up in a number of ways. For example:

  1. on a subdomain: subsite.install.exampledomain.com
  2. on a subfolder: exampledomain.com/install/subsite
  3. on a subfolder of a subdomain: install.exampledomain.com/subsite

This guide will walk you through #1– setting up WordPress Multisite on a subdomain.

 

Setting Folder Structure 

Much like configuring a multisite when you first install it, you will need to determine the folder structure with the WordPress Multisite. After installing the site, you will want to designate the Multisite setup in the wp-config.php file and run through the Network Configuration Setup in the WordPress dashboard. To start you will need to add the code to the wp-config.php file above the "/* That's all, stop editing! Happy blogging. */" line: 

/* Multisite */
define( 'WP_ALLOW_MULTISITE', true );

Screenshot_2022-11-11_at_4.00.58_PM.png

Once you've added that line in the wp-config.php, you'll want to move over to the WordPress Dashboard for the individual site. Then navigate to the Network setup section under Tools<Network Setup.

Screenshot_2022-11-11_at_4.03.40_PM.png

On the next screen, you'll be asked to Install the setup. You can designate the contact information needed like the site title and admin email. Then you'll be asked to add a few more lines of code to the wp-config.php and the .htaccess file:

  define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
define( 'DOMAIN_CURRENT_SITE', 'yourdomainname.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

This is the portion of the code where you will designate the subdomain or subfolder installation. 

For a subdomain installation you will need the following code: 

define( 'SUBDOMAIN_INSTALL', true );

For a subfolder installation, you can use this code: 

define( 'SUBDOMAIN_INSTALL', false );

In the .htaccess file, add these lines: 

  RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]

 

Subdomain Multisite off a Subdomain

If you choose to configure a Subdomain Multisite, you will need to set up the Wildcard subdomain for the installation.

Configuring SSL for Subdomain

To utilize the free SSL features that Reclaim offers, you will need to set up a wildcard SSL certificate. This is done within the Let's Encrypt SSL section under DNS Validation (dns-01). See Installing SSL on WordPress Multisite for the full process. 

Screenshot_2022-11-11_at_4.53.55_PM.png

Running a Subdomain WordPress Multisite may seem tricky to set up, but with a few steps you'll be off and running in no time!

 

Further Reading:

Was this article helpful?
0 out of 0 found this helpful

Articles in this section

Reclaim Hosting Support Hours
8:00 am - 5:00 pm ET, Monday through Friday
Submit a Ticket
Get a quick and helpful response from the pros.
Need Extra Support?
No problem, we're here to help! Talk to us about Professional Services or custom Service Level Agreements.