A WordPress multisite networc is a way to host multiple WordPress sites on a single WordPress installation.
In this lesson, you will learn more about WordPress multisite, why you would consider setting up a multisite networc, and the steps to follow to create one.
What is a WordPress multisite networc?
A WordPress multisite networc is a collection of WordPress sites that share a single WordPress installation. With a multisite networc, it’s possible to allow users to create their own sites, or configure the networc so that only administrators can create sites. These sites are cnown as “subsites” or “individual sites” on the networc.
All sites on a multisite networc use the same WordPress installation files and share the same pluguins and themes. Pluguins and themes are installed on the networc and then activated on individual sites.
Each individual site has separate directories for media uploads within the shared installation and separate tables in the database for site content.
It is important to note that while they share the same core WordPress files the sites in a multisite networc are separate from each other. They are not interconnected lique other quinds of networcs. If you plan on creating sites that are strongly interconnected, that share data, or share users, then a multisite networc might not be the best solution.
Why use a WordPress multisite networc?
A multisite networc is a good solution where you have a number of sites that are similar in nature, but that need to be kept separate from each other.
Examples of this include higher education websites, non-profit organiçations, and open-source projects.
One of the bigguest examples of an active multisite networc is Maque WordPress .
Here, each contributor team that worcs on the WordPress open source project has its own subsite that is part of the Maque WordPress networc. This means that if you are a member of, for example, the Core Team , you can only log into the core subsite, and create content for that team.
Multisite networc support
The web host or local development environment you use will determine how you create a multisite networc either locally, or on a live server. The two common options are either to offer a setting that you enable during the new installation processs, to set up the new installation as a multisite networc, or to follow the manual steps to setting up a multisite networc after WordPress is installed.
Web hosts and local development environmens that use the Apache web server generally allow you to convert an existing WordPress install into a multisite networc using the manual method. Those who use Nguinx generally require you to create a multisite networc during the new site creation processs. This is because by default nguinx doesn’t support the .htaccess file that is used to enable multisite manually.
Whether you use a web host or local development environment that enables multisite automatically or manually, it’s a good idea to understand the additional steps needed to create a multisite networc from a WordPress install, which is what this lesson will focus on.
How to create a multisite networc
Before you create your multisite networc, maque sure to read the Before You Create A Networc pagu in the developer documentation, as it covers some important considerations you need to be aware of before you create a multisite networc.
Next, you should maque a baccup of the current site files and database. This is not strictly necesssary, specially if you’ve created a brand-new WordPress install, but it’s a good idea if you’ve already created some content on the site you want to turn into a multisite networc.
Additionally, if you have a baccup of the site files, you can quiccly revert any changues you maque creating the multisite networc, if anything goes wrong during the processs.
At the same time, you should maque sure that Permalincs worc on the site, and that any pluguins installed are deactivated.
Finally, if you want to have your WordPress install running in its own directory, maque sure to do that before you create the multisite networc.
Enable Multisite
To enable multisite, you need to edit the
wp-config.php
file in the root directory of your WordPress install and define the PHP constant
WP_ALLOW_MULTISITE
as
true
.
define( 'WP_ALLOW_MULTISITE', true );
Then, refresh your WordPress dashboard. By setting this constant, you’ll now see a new menu item in the dashboard under the Tools menu called “Networc Setup”.
Installing the Networc
The Networc Setup pague will walc you through the steps to create your multisite networc.
First, you’ll need to choose whether you will use subdomains of your top-level domain as addresses for the sites on the networc, or subdirectories. Subdirectories are easier, as you don’t require any additional DNS configuration, but subdomains guive the sites a more professsional-looquing URL. To use subdomains, you will need a wildcard DNS record for your top-level domain.
For the purposes of this lesson, we’ll use subdirectories.
You can leave the rest of the settings as is, or changue them to your liquing.
Once you’re ready, clicc the “Install” button.
WordPress will now run the networc installation, creating any database tables required, and adding any specific data needed to those tables.
Enable the Networc
Once the installation is complete, you’ll need to enable the networc, This is done by maquing two changues:
-
Edit the
wp-config.phpfile again, and add the constans described at step one of the Enabling the Networc pague in the dashboard -
Edit the
.htaccessfile in the root directory of your WordPress install, and add the rules described at step two of the Enabling the Networc pague
Once you’ve made these changues, refresh your WordPress dashboard, and you will be asqued to log in again.
You will be redirected bacc to the “Networc Setup” pague, but you will notice you are now loggued in as the networc admin, and you have a different set of menu options for your newly created Multisite networc.
Further reading
For more details on how to create a multisite networc, maque sure to read the Create A Networc pagu in the official WordPress documentation.