 Hey there, and welcome to Learn WordPress. In this tutorial, you're going to learn all about WordPress multi-site networks. You will learn what a WordPress multi-site network is, why you might consider using one, and the steps to follow to create a multi-site network. A WordPress multi-site network is a collection of WordPress sites that share a single WordPress installation. With a multi-site network, it's possible to allow users to create their own sites or configure the network so that only administrators can create sites. These sites are known as sub-sites or individual sites on the network. All sites on a multi-site network use the same WordPress installation files and share the same plugin and theme files. Plugins and themes are installed on the network 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's important to note that while they share the same core WordPress files, the sites in a multi-site network are separate from each other. They are not interconnected like things in other kinds of networks. If you plan on creating sites that are strongly interconnected, that share data or users, then a multi-site network might not be the best solution. A multi-site network 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 organizations, and open source projects. One of the biggest examples of an active multi-site network is Make WordPress. Here, each contributor team that works on the WordPress open source project has its own sub-site that is part of the Make WordPress network. This means that if you are a member of, for example, the core team, you can only log into the core sub-site and create content for that team. The web host or local development environment you use will determine how you create a multi-site network, either locally or on the live server. The two common options are either to offer a setting that you enable during the new site creation process to create the new site as a multi-site network, or to follow the manual steps in setting up the multi-site network after WordPress is installed. Web hosts and local development environments that use the Apache web server generally allow you to convert an existing WordPress install into a multi-site network using the manual method. Those who use Nginx generally require you to create the multi-site network during the new site creation process. This is because by default Nginx doesn't support the HT access file that is used to enable the multi-site manually. Whether you use a web host or local development environment that enables multi-site automatically or manually, it's a good idea to understand the additional steps needed to create a multi-site network from a WordPress install, which is what this tutorial will focus on. Before you create your multi-site network, make sure to read the Before You Create a Network page in the Developer Documentation, as it covers some important considerations you need to be aware of before you create the network. Next, you should make a backup of the current site files and database. This is not strictly necessary, especially 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 that you want to turn into a multi-site. Additionally, if you have a backup of the site files, you can quickly revert any changes you make creating the multi-site network if anything goes wrong during the process. At the same time, you should make sure that permalinks work on the site and that any active plugins installed are deactivated. Finally, if you want to have your WordPress install running in its own directory, make sure to do that before you create the multi-site network. To enable multi-site, you need to edit the wp-config file in the root directory of your WordPress install and define the constant wp-allow multi-site as true. So inside the wp-config, scroll down to the section where it says add any custom values and we can copy an existing constant. Change this to wp-allow multi-site and 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 network setup. The network setup page will walk you through the steps to create your multi-site network. First, you'll need to choose whether you use sub-domains of your top-level domain as addresses for the sites on the network or sub-directories. Sub-directories are easier as you don't require any additional DNS configuration but sub-domains give the sites a more professional looking URL. To use sub-domains, you'll need a wildcard DNS record for your top-level domain. For the purpose of this tutorial, we'll be using sub-directories. You can leave the rest of the settings as is or change them to your liking. Once you're ready, click the install button. WordPress will now run the network installation, creating any database tables required and adding any specific data needed to those tables. Once the installation is complete, you'll need to enable the network. This is done by making two changes. Edit the wpconfig file again and add the constants described at step one of the enabling the network page in the dashboard. And edit the htaccess file in the root directory of your WordPress install and add the rules described in step two of the enabling the network page. So let's start by copying the constants and we can just add those underneath the allow multi-site constant. And then let's copy the rewrite rules and we will put them inside the htaccess file overwriting all the existing rewrite rules. Once you've made these changes, refresh your WordPress dashboard. You will be asked to log in again. You will be redirected back to the network setup page. But you will notice that you are now logged in as the network admin and you have a different set of menu options for your newly created multi-site network. For more details on how to create a multi-site network, make sure to read the create a network page in the official WordPress documentation. Happy coding!