Before going live with your site, you should test the output to ensure quality. While a localhost environment allows you to experience updates and verify settings before going live, setting up a single site locally is straightforward—but what about configuring a WordPress multisite network? Let’s look at how to set up a WordPress multisite network on your local host.
What’s WordPress Multisite Network
What is a WordPress Multisite Network?
A WordPress Multisite Network allows you to create and manage multiple websites from a single WordPress installation. Instead of maintaining separate WordPress instances for each site—each with its own database, files, plugins, and dashboard—you can run an entire network of sites using shared resources and a centralized administration panel.
Think of it as having one WordPress “command center” from which you can control dozens or even hundreds of individual websites. Each site in the network maintains its own content, design, and URL, but they all share the same core WordPress files and database structure.
When to Use WP Multisite
A multisite network is useful if you’re creating a network of sites sharing similar functionality. You can add this functionality through plugins, custom applications, or specific server configurations.
Universities are a great example, as a lot of them use multisite to provide their staff with a way of posting internal blog posts. Real estate companies also make use of WordPress multisites to provide their agents with a basic website to use for themselves.
However, WordPress multisite isn’t for everyone. It’s generally a bad idea if:
- You’re managing a few websites with different functions, purposes, and goals.
- You need totally separate databases, as multisite stores everything within the same database.
- You need to share content or want a cross-site search tool. WordPress Multisite does not work here, as networked sites are content independent.
How to Setup WordPress Multisite on Localhost
Assuming you’ve already installed WordPress on your computer. If you haven’t yet, simply follow the instructions below. This is the time to decide whether to install additional sites in a subdirectory or under a sub-domain.
WordPress subdomains and subdirectories relate to the structure of the URLs used for each of the sites in your Multisite network. They don’t correspond to where your server stores the sites, but to the way WordPress creates URLs for them.
For example, a sub-domain URL for individual sites will read: site1.YOURSITE.com, site2.YOURSITE.com. In comparison, a sub-directory URL for the individual sites will read: YOURSITE.com/site1, YOURSITE.com/site2.
Currently, WordPress doesn’t offer built-in functions to create multisite with subdomains in localhost (it can be done, but to bypass this restriction, you might need some technical knowledge).
However, you can create a multisite with subdirectories with just with simple steps. So, in this guide, we’ll deal with how to have a multisite network using subdirectories.
Step 1: Enabling Multisite Feature
To do this, you need to modify the WordPress configuration: wp-config.php. You can find this file by logging into your server using an FTP client, accessing File Manager through your hosting provider, or simply using plugins such as WP File Manager.
Once you’ve opened the wp-config.php file, locate the part that says:
/* That's all, stop editing! Happy blogging. */
Above the line shown above, add the following code:
/** Multisite */
define('WP_ALLOW_MULTISITE', true);
Once done, press Save and Close, then go back to your WordPress to enable the Network.

Step 2: Setting Up Your Network
You’ll now see a new “Network Setup” option under the “Tools” section in your dashboard. Click it to continue.
You’ll likely see a warning message. Before proceeding, navigate to the “Plugins” section and deactivate all active plugins (use “Bulk Actions” for efficiency).

Return to the “Network Setup” screen, select the subdirectories option, complete the required details, and click “Install.”
Step 3: Enabling the Network
After clicking the Install button, WordPress will generate configuration lines in the wp-config.php and .htaccess files.

#1. Edit Wp-config.php File
Add the following code to your wp-config.php file.
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'yourdomain.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
This is what you should have in your wp-config.php file:

#2. Edit the Webserver Config
If using Apache: Edit the .htaccess file located in the same directory as wp-config.php
If using NGINX: Edit your NGINX configuration file
Save all changes. Your WordPress Multisite network is now successfully installed.
To access your Network Admin Dashboard, log in again. You should now see a new “My Sites” section in your dashboard.
After that, you should see the new My sites section:

Step 3: Adding Sites to Your Network
Now you can start creating sites and adding them to your network by clicking through My Sites > Network Admin > Sites > Add New:

Fill in the details for the individual sites, such as Site Address, Site Title, and Admin Email. Once done, click Add Site.
Repeat this process to add as many sites as needed. All sites in your network will be visible under “All Sites.”
Step 4: Adding Themes and Plugins to Your Network
With multisite enabled, Network Administrators can install themes and plugins that can be:
- Activated selectively on individual sites
- Activated across the entire network
Now You Know How to Set Up Multisite on Localhost
Now your WordPress multisite network should be running on your localhost environment successfully. This configuration allows you to:
- “Network activate” themes and plugins to make them available across all sites simultaneously
- Create, edit, and manage multiple sites from a centralized dashboard
- Test different site configurations in a controlled development environment before deployment
This local multisite setup is a great option for developing and testing complex WordPress networks without affecting live websites.