Make your CMS faster

Platform Optimised Hosting

Back to blog

How to create a WordPress Multisite install

WordPress Multisite enables a single WordPress install with a single database to host multiple websites with completely different content.

WordPress admins find this type of install attractive because it means they can manage all their WordPress installs from a single admin dashboard. Installing a plugin makes it available for use on all sites and updating plugins across all sites is a single click of a button, saving many hours of fairly dull “point and clicking”.

The disadvantage to this type of set up, is that it can become fairly complex, pretty quickly if you don’t plan the install from the start. For instance, having sites that resolve to a mixture of www and non www, or using different types of domain instances within cPanel (parked, alias and addon domains), can make something relatively simple, such as a http -> https redirection, far more complex.

As all sites are managed by a single database instance, you also need to take care not to add too many sites, which would bloat the database excessively and cause slow queries and WordPress sites.

Properly planned and managed, a WordPress Multisite makes a lot of sense. In this guide I’ll talk you through how to install WordPress Multisite using domains prefixed with a www.

These steps assume that you have already installed WordPress. If not you should follow our guide how to install WordPress

1
Backup your site

Enabling Multisite is a major change. You should backup you WordPress site before you proceed any further.

Not sure how? Review our How to manually backup WordPress using cPanel guide

2
Ensure existing WP install uses www.

Login to your WordPress dashboard

Navigate to Settings > General

Ensure the “WordPress Address (URL)” and “Site Address (URL)” is prefixed with https://www. or https://www. (https://www. is recommended).

3
Enable Multisite

In order to convert your existing WordPress install to a multisite instance, you need to edit wp-config.php which is in the root directory of your WordPress install

Open up wp-config.php and add this content above where it says /* That’s all, stop editing! Happy blogging. */

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

Save the file before closing it

4
Configure the Multisite Network

Editing wp-config.php as per step two enables a new item in your Tools menu named “Network Setup”

In your WordPress dashboard, navigate to Tools -> Network Setup

5
Configure the Multisite Network

Select the “Sub-domains” radio button.

Enter a “Network Title” and your “Network Admin Email”

Click the “Install” button

6
Enable the Network

On the “Create a Network of WordPress Sites” page copy the code in the two boxes and paste into the wp-config.php and htaccess files as indicated

wp-config.php code should look like below: (replace www.yourdomain.tld for you actual domain)

RewriteEngine On
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]

htaccess code should look like below:

RewriteEngine On
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]
7
Reload the WP admin dashboard

Log out of WordPress and log back in again

You should notice that there is a new Multisites icon in the top left

Using the link you can administer existing sites and add new sites

Summary

Installing WP Multisites is a fairly trivial task.

The important part, is making sure that you’ve planned it properly, so that future tasks such as putting in place SSL certificates isn’t complex.

Watch out for our future blogs on how to add an additional site and how to install an SSL using AutoSSL.


Phil Backhouse
Phil

Technical Support

Phil is a dedicated member of our Client Technical Support team. Passionate about Linux and exploring the vulnerabilities of insecure plugins, Phil constantly hones his skills to stay ahead of potential threats.

@clookinternet