WordPress Multisite Network — Setup, Management and Real-World Use Cases
In this tutorial, you'll learn to set up a WordPress Multisite network — enabling multisite, adding sites, managing users, and choosing subdomain vs subdirectory.
What You'll Learn
- What Multisite is and when to use it (and when NOT to)
- How to enable Multisite by editing
wp-config.php - Subdomain vs subdirectory installation — which to choose
- The Network Admin dashboard: Sites, Users, Themes, Plugins, Settings
- Managing themes and plugins network-wide vs site-level
- How users work across the network
- Multisite database tables and how they differ from single site
- How to back up and migrate a multisite network
Why It Matters
Running multiple WordPress sites usually means multiple installations — each with its own database, its own updates, and its own maintenance. If you manage 10 client sites, that is 10 separate installations to keep updated and secure. Multisite lets you run all of them from a single WordPress installation. One core update, one set of plugins, one login for the network admin. This saves enormous time and effort — but it also comes with trade-offs that you must understand before choosing this approach.
Real-World Use
A university needs websites for each department: arts.university.edu, sci.university.edu, engineering.university.edu, and a central university.edu homepage. Each department manages its own content and users. The IT department manages the server, theme, and core updates. Multisite lets the IT team update all sites at once while giving each department control over its own content.
Learning Path
flowchart LR
A[Managing Users] --> B[WordPress Multisite Network]
B --> C[Site Health & Debugging]
B --> D[Performance Optimization]
style B fill:#38bdf8,color:#0f172a,stroke-width:2px
What Is Multisite?
Multisite is a feature of WordPress that lets you run multiple sites from a single WordPress installation. Each site shares the same WordPress core files, plugins, and themes but has its own:
- Content (posts, pages, media)
- Users (site-specific administrators, editors, authors)
- Database tables (prefixed with the site ID)
- Settings
Think of it like an apartment building. The building (WordPress installation) has one foundation, one roof, and one maintenance team. But each apartment (site) has its own layout, its own furniture, and its own tenants. Tenants can decorate their apartment however they want, but they cannot change the building's structure.
When to Use Multisite
Multisite is ideal when:
- You manage multiple sites for the same organization — University departments, company subsidiaries, government agencies.
- You run a network of blogs — WordPress.com itself is a giant Multisite network.
- You build client sites on a managed platform — An agency managing multiple client sites from one dashboard.
- You need language or regional versions —
en.example.com,fr.example.com,de.example.comeach with localized content. - You want centralized management — One place to update core, themes, and plugins for all sites.
When NOT to Use Multisite
Multisite is NOT ideal when:
- Each site needs its own hosting — If sites are on different servers, you cannot use a single installation.
- Sites need different plugins — In Multisite, plugins are installed once for the whole network. You cannot run different plugin versions on different sites.
- Each site is for a different customer — If one customer's site goes down, all sites are affected. A plugin update that breaks site A also breaks site B.
- You need custom core modifications — Core modifications affect all sites. You cannot customize core for one site without affecting others.
- A single site has very high traffic — Traffic spikes on one site consume server resources for all sites.
The rule of thumb: if the sites share the same owner, the same server, and the same plugin requirements, Multisite is a good fit. If they are independent businesses with different needs, separate installations are safer.
Enabling Multisite
Enabling Multisite requires editing files. You cannot enable it from the admin dashboard.
Step 1: Back Up Everything
Before making any changes, back up your database and files. Enabling Multisite is a one-way operation — reversing it is difficult.
Step 2: Add the Constant to wp-config.php
Open your wp-config.php file and add this line above the /* That's all, stop editing! */ comment:
define('WP_ALLOW_MULTISITE', true);
Save the file and log back into the admin dashboard. You will see a new Tools > Network Setup menu item.
Step 3: Run the Network Setup
Go to Tools > Network Setup. Choose whether to use subdomains or subdirectories (see the next section). Your WordPress installation will give you code snippets to add to wp-config.php and .htaccess.
// These lines will be generated — add them to wp-config.php
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false); // true for subdomains, false for subdirectories
define('DOMAIN_CURRENT_SITE', 'example.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
# Add this to your .htaccess file (replacing existing WordPress rules)
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
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]
Step 4: Log Back In
After adding the code, log out and log back in. You will see a new My Sites menu at the top of the admin bar and a Network Admin menu.
Subdomain vs Subdirectory
This is the most important decision when setting up Multisite.
Subdomain Installation
URLs look like: site1.example.com, site2.example.com
- Requires wildcard DNS record (
*.example.compoints to your server) - Each site looks like a separate domain
- Better for distinct brands or departments
- More complex to set up (DNS configuration required)
- Cannot switch from subdirectory to subdomain later without Migration
Subdirectory Installation
URLs look like: example.com/site1/, example.com/site2/
- No DNS changes required
- Easier to set up
- Sites share the main domain's SEO authority
- Can look less polished for distinct brands
- Cannot switch from subdomain to subdirectory later without migration
// Check which type you are using programmatically
if (is_subdomain_install()) {
echo 'This network uses subdomains.';
} else {
echo 'This network uses subdirectories.';
}
Which should you choose? If you are not sure, choose subdirectories. They are easier to set up and work well for most use cases. Choose subdomains only if each site genuinely needs its own domain identity.
Network Admin Dashboard
After enabling Multisite, click My Sites > Network Admin to access the network-level dashboard.
Sites
The Sites screen lists every site in your network. For each site you can:
- Edit site settings (title, URL, admin email)
- View site users
- Change site themes
- Enable or disable plugins for that site
- Delete the site
// Get all sites in the network
$sites = get_sites();
foreach ($sites as $site) {
echo 'Site ID: ' . $site->blog_id . ' — ' . $site->blogname . ' (' . $site->siteurl . ')' . "\n";
}
Users
The Users screen shows all users across the network. You can:
- Add a new user to the network
- Add an existing user to a specific site
- Manage Super Admins (users who can manage the entire network)
Themes
The Themes screen lets you enable themes network-wide. A theme must be network enabled before any site can use it. You can also enable individual themes for specific sites from the site's edit screen.
// Enable a theme for the entire network
add_filter('allowed_themes', function($allowed_themes) {
$allowed_themes['my-custom-theme'] = true;
return $allowed_themes;
});
Plugins
Plugins can be activated in two ways:
- Network Activate — The plugin is active on every site in the network. Site admins cannot deactivate it.
- Site Activate — The plugin is available but each site admin can choose to activate or deactivate it.
Choose network activation carefully. A buggy plugin network-activated affects every site. Start with site activation and only network-activate essential plugins.
// Check if a plugin is network activated
if (is_plugin_active_for_network('akismet/akismet.php')) {
echo 'Akismet is active on all sites.';
}
Settings
The network settings screen mirrors the single-site settings screen but applies defaults for the entire network. Key settings include:
- Network Title — The name of the network.
- Network Admin Email — Where network-level notifications are sent.
- Registration Settings — Allow new sites to be created by users, or restrict to admin only.
- New Site Settings — Default theme, max upload file size, and other defaults for new sites.
Dashboard
The network dashboard shows at-a-glance information: number of sites, number of users, space used, and recent activity across all sites.
Adding New Sites
To add a new site, go to Network Admin > Sites > Add New.
Required Fields
- Site Address — The URL of the new site (e.g.,
newstoreforexample.com/newstore/ornewstore.example.com). - Site Title — The name of the site.
- Admin Email — The email address of the site administrator. If the user does not exist, WordPress creates them as a Subscriber on the network and an Administrator on this site.
// Programmatically create a new site
$new_site_id = wpmu_create_blog(
'newsite', // Site slug
'/', // Path (use '/' for subdomain installs)
'New Site Title', // Site title
1, // Site admin user ID
array(
'public' => 1,
)
);
if (is_wp_error($new_site_id)) {
echo 'Error creating site: ' . $new_site_id->get_error_message();
} else {
echo 'New site created with ID: ' . $new_site_id;
}
Managing Themes Network-Wide
Themes work differently in Multisite. A theme must be:
- Installed in
wp-content/themes/(as usual). - Network enabled via Network Admin > Themes (click "Enable").
- Activated per site by the site admin.
This three-step Process ensures site admins can only use themes you approve. A poorly coded theme on one site cannot affect other sites (as long as it is properly coded).
// Allow a specific theme for only one site
add_filter('allowed_themes', function($allowed_themes) use ($site_id) {
if (get_current_blog_id() === $site_id) {
$allowed_themes['premium-theme'] = true;
}
return $allowed_themes;
});
Managing Plugins
Plugins are installed in wp-content/plugins/ as usual. The decision is how to activate them.
Network Activate
Use this for plugins that every site needs: security plugins, Caching plugins, SEO framework plugins.
// Network activate a plugin programmatically
require_once ABSPATH . 'wp-admin/includes/plugin.php';
activate_plugin('akismet/akismet.php', '', $network_wide = true);
Site Activate
Use this for plugins that sites may or may not need: contact form plugins, page builders, specific feature plugins.
Users Across the Network
Super Admin
Super Admins have full control over the entire network. They can:
- Create and delete sites
- Install and network-activate themes and plugins
- Manage all users
- Change network settings
Site Administrators
A site Administrator has full control over their own site but cannot:
- Access network admin
- Install themes or plugins (unless network-enabled and site-activated)
- Manage other sites' users or content
Adding Users to Sites
A user can be a member of multiple sites with different roles on each. For example, Jane could be Administrator on site1 and Editor on site2.
// Add a user to a specific site with a specific role
add_user_to_blog($site_id, $user_id, 'editor');
// Remove a user from a site
remove_user_from_blog($user_id, $site_id);
// Get all sites a user belongs to
$blogs = get_blogs_of_user($user_id);
foreach ($blogs as $blog) {
echo 'User is member of: ' . $blog->blogname;
}
Multisite Database Tables
In a single-site installation, your tables are prefixed with wp_. In Multisite, each site gets its own set of tables with the site ID in the prefix.
Network-Wide Tables (shared across all sites)
| Table | Purpose |
|---|---|
wp_blogs |
List of all sites in the network |
wp_blogmeta |
Metadata for each site |
wp_site |
Network information (usually one row) |
wp_sitemeta |
Network-wide settings |
wp_users |
All users across the network |
wp_usermeta |
User metadata across the network |
wp_registration_log |
Registration records |
wp_signups |
Pending signups |
Site-Specific Tables (one set per site)
| Table | Purpose |
|---|---|
wp_2_posts |
Posts for blog ID 2 |
wp_2_comments |
Comments for blog ID 2 |
wp_2_options |
Settings for blog ID 2 |
wp_2_terms |
Categories and tags for blog ID 2 |
If you have 10 sites with 10 tables each, plus the network tables, your database could have 100+ tables. This is normal but worth knowing for backups and migrations.
-- Find all tables in a multisite installation
SHOW TABLES LIKE 'wp\_%';
-- Get all sites from the blogs table
SELECT blog_id, domain, path, registered, last_updated
FROM wp_blogs
WHERE archived = 0 AND spam = 0 AND deleted = 0;
Backing Up Multisite
Backing up a multisite network requires all of the following:
- The entire database — Every table, network and site-specific.
- The
wp-content/directory — Uploads for all sites, themes, plugins. - The
wp-config.phpfile — Contains the network configuration. - The
.htaccessfile — Contains the Multisite rewrite rules.
If you miss any of these, you cannot restore the network. Use a backup plugin that explicitly supports Multisite, or use WP-CLI:
# Export the entire database
wp db export --all-tablespaces ./backups/full-backup.sql
# Export only network tables
wp db export --tables=$(wp db tables --network --format=csv) ./backups/network-tables.sql
Moving a Multisite Site to Its Own Installation
Sometimes you need to spin a site out of a Multisite network into its own standalone installation. This process is called "unsplitting" or "site extraction."
- Create a new WordPress installation on the destination server.
- Export the site's database tables from the Multisite database.
- Use
wp db exportwith the site-specific table prefix.
- Use
- Import into the new database.
- Copy the site's uploads from
wp-content/uploads/sites/{site_id}/towp-content/uploads/in the new installation. - Update URLs in the database — search for the old multisite URL and replace with the new standalone URL.
- Remove Multisite-specific rows from the
wp_optionstable.
# Export only tables for blog ID 3
wp db export --tables=$(wp db tables --blog=3 --format=csv) ./backups/site3.sql
# After importing, update URLs in the new database
wp search-replace 'oldsite.example.com' 'newsite.com' --all-tables
This is a complex operation. Test it on a staging environment first.
Common Mistakes
Enabling Multisite on an existing site without a backup. Enabling Multisite restructures your database and rewrites URLs. If something goes wrong, you need that backup to revert. Always back up before enabling.
Using Multisite for unrelated client sites. If site A is a restaurant and site B is a law firm, they have different needs and should not share a server. If a plugin update breaks site A, site B breaks too. Use separate installations for unrelated clients.
Confusing Super Admin with site Administrator. A Super Admin can manage the entire network. A site Administrator can only manage their own site. Giving a user Super Admin status when they only need site-level access is a security risk.
Not planning the URL structure before setup. You cannot change from subdirectory to subdomain (or vice versa) without rebuilding the network from scratch. Choose carefully at the beginning.
Forgetting that all sites share server resources. One site with high traffic or a runaway script can slow down or crash every site in the network. Monitor resource usage across all sites.
Practice Questions
A university wants separate websites for each department. Each department should manage its own content. The IT team wants to manage core updates centrally. Is Multisite appropriate? Answer: Yes. This is a textbook use case for Multisite — same organization, same hosting, central management with distributed content control.
A web agency manages WordPress sites for 20 different restaurant clients. Each restaurant has different plugins for reservations, menus, and delivery. Should they use Multisite? Answer: No. Different clients mean different plugin requirements, different hosting needs, and the risk that one client's issue affects all others. Use separate installations.
You set up Multisite with subdirectories (
example.com/site1/) and later realize you need subdomains (site1.example.com). Can you switch? Answer: No, not without rebuilding the network from scratch. TheSUBDOMAIN_INSTALLconstant in wp-config.php cannot be changed after initial setup without a full migration.
Challenge: Set up a local Multisite network with three test sites. On site 1, install and activate a theme. On site 2, activate a different theme. On site 3, network-activate a plugin and verify it appears on all sites. Then use WP-CLI to export only site 2's tables and import them into a fresh single-site installation. Document each step.
FAQ
Mini Project
Create a Multisite network for a fictional "City of Riverside" government website:
- Set up a local WordPress installation and enable Multisite with subdirectories.
- Create these sites: Parks & Recreation (
/parks/), Public Library (/library/), City Council (/council/), and Water Services (/water/). - Enable a single theme network-wide and allow different site admins to activate different color variants (using a theme that supports this or a custom solution).
- Network-activate a security plugin (like Akismet or a simple security plugin).
- Create one test user and assign them as Editor on the Parks site and Subscriber on the Library site.
- Verify that the user can edit content on Parks but only read on Library.
- Write a brief disaster recovery plan for this network: how to back up all data and how to restore a single site if its database tables become corrupted.
This exercise gives you practical experience setting up and managing a real-world Multisite network.
What's Next
Now that you understand Multisite, move on to Site Health and Debugging to learn how to diagnose issues across your network. Then explore Performance Optimization to keep your network running fast.
For more depth, see Security Hardening (securing a multisite network differs from a single site) and PHP Database (advanced queries with wpdb in a multisite context).
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro