How to Create WordPress Multisite

Passionate blogger and open-source developer. Likes to read and write about WordPress. When not working on any project, he enjoys surfing, tennis and running.
. No Comments

The main objective of WordPress Multisite is to be able to run multiple sites using a single WordPress installation on your server.

You can create as many sites as you like and manage them all from one dashboard.

WordPress Multisite does not require any special arrangements and has the same file structure as a regular WordPress site. This also makes easier to set up, manage and update several sites at a time.

If you are familiar with the standard WordPress file system, it won’t take long for you to set up your own WordPress Multisite Network.

Who needs WordPress Multisite?

WordPress Multisite is an essential feature for large websites with several subdomains with their separate teams. A network of Multisite can be used in the following scenarios:

  • Retail store having sub-sites for each location managed by separate teams.
  • E-commerce store operated in different countries offering country-specific services/offers through its sub-sites managed by a specific team.
  • Banks having several sub-sites for each branch.
  • A network of blogs managed by separate teams.
  • Hotel business having subsites for each region managed by its own team.

Choosing WordPress Multisite depends on your requirements. Alternatively, you can use tools like ManageWP and InfiniteWP for managing multiple sites if you do not find that WordPress Multisite suits your requirements.

Setting Up a WordPress Multisite Network

Before we begin with WordPress Multisite setup, let’s discuss some important points which can come in handy in later parts of this article.

All the sites hosted under WordPress Multisite Network are hosted on the same server. Therefore, all the sites consume resources from the same server. Web hosting such as VPS and dedicated hosting are preferred for Multisite setup as they offer better hardware and server scalability in case of larger sites.

We will be altering a few WordPress files in this article which will require FTP access. We will walk you through the whole process step-by-step but it would be a plus if you are already familiar with FTP and basic WordPress installation.

Activating Multisite Network on WordPress

Without further ado, let’s begin activating our very own Multisite Network on WordPress site.

Note: Please make a full backup before applying Multisite on an existing WordPress site. For backing up you can use any plugin or manually make a backup of both files and database. Fresh WordPress installation does not require any additional steps.

To enable WordPress Multisite, access your WordPress files using FTP or cPanel File Manager and make changes in the wp-config.php file. We will be using FTP throughout the article.

WordPress files are located inside the public_html folder.

Wp-config in FTP

Copy the file and open it in any text editor of your choice (for example, you can use Sublime Text). Add the following line of code right above the text that says “/* That’s all, stop editing! Happy blogging. */” on line 78.

define( 'WP_ALLOW_MULTISITE', true );

Save the file and upload it back to your public_html folder.

Now log in to your WordPress dashboard and disable all the plugins. Then go to Tools -> Network to enable Multisite.

WordPress Multisite Network setup screen

Wildcard Subdomains

If you intend to use subdomain feature of Multisite, you need to enable wildcard DNS record on your server.

Example URL for subdomain looks something like this: http://site1.mydomain.com

This can be configured using cPanel. Go to under Domains -> Subdomains.

Wildcard subdomains

On the next screen enter (*) in the subdomain field and hit ‘Create’ to save the changes.

Subdomains screen

Note: cPanel provided by your hosting service might look a bit different than the one I have.

Go back to your WordPress dashboard and once the option is selected click on Install button to activate the network.

Once the network is completed, network configuration page will pop up containing necessary code that needs to be inserted in both the wp-config file and .htaccess file to complete the process.

WordPress Multisite Network configuration

Let’s head back to FTP to modify wp-config.php and .htaccess files with the code provided.

Wp-config.php

Add the following line of code below the ‘WP_ALLOW_MULTISITE’ line we added previously.

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

.htaccess

Sometimes .htaccess file is hidden and not visible inside public_html folder. Add the following lines of code inside the <IfModule mod_rewrite.c> tag.

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]

Save both the files and upload them to public_html folder using FTP.

Log out from the WordPress dashboard to save the progress and log back in.

Network Management

We have successfully created our network and you can also see the change in the WordPress admin dashboard.

WordPress Multisirte Netword dashboard

In order to add our first site in WordPress Multisite Network go to Network Admin dashboard located at the top.

Network Admin Dashboard

Upon clicking on Dashboard list of options, the side menu will change and new options will appear for managing Multisite. On this screen we can now add a new site to our Multisite Network.

Admin Dashboard structure

From the side menu, click on Sites -> Add New to create a new site. Fill the required fields and hit Add Site button to save the changes.

 Adding a new site

Follow the same step to add other sites as well and all the added sites can be viewed under All Sites tab under Sites option.

All Sites dashboard

To access their dashboards simply hover over the selected site and click on the Dashboard link. This is how we can edit each site individually using Multisite admin dashboard.

Settings such as New Registrations, Users, Upload Size and Welcome Email can not be configured from network settings.Network admin settings

Installing and Activating Themes and Plugins

One of the key features of managing a network of WordPress Multisite is to add and install themes and plugins. The multisite feature gives the site-specific control for both themes and plugins.

Let’s see how to install and activate a theme on one of the sites in our Multisite Network.

Go to Network Admin Dashboard -> Themes and click on Add New button to install a new theme.Adding a new theme

Once the theme is installed it will appear in the theme list. Here you can specificity whether to enable the theme for the network or not.Network enabling a theme

Currently, in my setup we only have one theme enabled for the whole network.

Site Specific Themes

You may also enable a specific theme for a specific site. In the case of multiple sites, this feature comes in handy to activate a specific theme on a single site. To do so, go to your Network Admin Dashboard -> All Sites. Hover over the selected site and click on Edit button appeared.

From the next screen, navigate to Themes tab and enable or disable the specific theme from the list.Site specific theme

Let’s see how plugins can be managed using the Multisite Network.

Head back to Network Admin dashboard as plugins can only be installed by the administrator. Go to Plugins and add a new plugin of your choice.

Adding a plugin

Unlike themes, plugins cannot be activated for a specific site. Instead, once the plugin is installed by the administrator it can be activated for each site if needed.

To do so, navigate to sub-site’s Dashboard -> Plugins and Activate the installed plugin from the list.

Note: Only the plugins which are network-enabled by the administrator can be activated. Other plugins can be seen on the list but cannot be activated.Activating a plugin

For example, the “Hello Dolly” plugin is network-disabled. Therefore, it cannot be activated by this sub-site.

Security

Running a WordPress Multisite Network smoothly can become a bit of challenging if it’s not secured properly. Securing Multisite is as important as securing any WordPress website and the same principals can be applied:

  • Frequent updates of the WordPress core files, themes and plugins.
  • Integration of SSL certificate for data encryption.
  • Make regular backups to avoid data loss.
  • Installing a reliable security plugin (Sucuri, WordFence, MalCare etc.).
  • Use two-factor authentication for user login.
  • Avoid using null themes and outdated plugins.

Following the above techniques can help you build a secure WordPress Multisite Network.

Benefits of Having WordPress Multisite Network

WordPress Multisite is an amazing feature to manage a network of virtual sites using a single WordPress installation. In the article above we saw how easy it is to create and manage one.

While using WordPress, it’s important to update themes and plugins regularly. It’s easy if you only have two to three sites to manage. Now imagine the time and effort it will take if you have 20 or 40 sites to manage? With Multisite, as we’ve seen earlier, you can control both the themes and plugins of all the sites in the network using only one admin dashboard.

Another advantage of using Multisite Network is the user management. It’s easier to assign managing various sites to one user. A permission for creating their own website can also be granted.

Usually, large blogging sites give restricted access to their editorial staff who can only manage the content of their blog and have no access to make any changes on the actual site.


Want to ask a question or leave a comment?


Ask me anything

captcha



  • +

0 comments

Leave a Reply

Your email address will not be published. Required fields are marked *

*