WordPress Multisite: How to Set Up a Network of Sites

WordPress Multisite lets you run multiple websites from a single WordPress installation, sharing the same core files, themes, and plugins. It’s ideal for franchise sites, university networks, or any organisation that needs a fleet of branded sites with centralised management.

Problem: A client needs to manage multiple related WordPress sites — sharing themes, plugins, and user accounts — but maintaining separate installs duplicates every upgrade, security patch, and plugin activation.

Solution: Enable WordPress Multisite by adding WP_ALLOW_MULTISITE to wp-config.php, running the Network Setup wizard from the Tools menu, then updating wp-config.php and .htaccess with the generated constants to activate the network.

Step 1 — enable Multisite in wp-config.php:

/* Add BEFORE the line "That's all, stop editing!" */
define( 'WP_ALLOW_MULTISITE', true );

Step 2 — go to Tools → Network Setup, choose subdirectory (example.com/site1/) or subdomain (site1.example.com), click Install, and copy the two code blocks WordPress gives you.

Step 3 — add the Network constants to wp-config.php:

define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false ); // true for subdomain installs
define( 'DOMAIN_CURRENT_SITE', 'example.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

Step 4 — update .htaccess (replace the existing WordPress block):

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# Add trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

Managing the network with WP-CLI:

# List all sites in the network
wp site list --fields=blog_id,url,registered

# Create a new site
wp site create --slug=marketing --title="Marketing Team" --email=admin@example.com

# Activate a plugin network-wide
wp plugin activate seo-plugin --network

# Run a command on every site in the network
wp site list --field=url | xargs -I % wp --url=% cache flush

NOTE: Not all plugins are Multisite-compatible. A plugin that hard-codes blog_id = 1 or stores data without the site prefix will break on secondary sites. Always test plugins in a Multisite environment before deploying them network-wide.