WordPress Multisite is a feature built into WordPress core that lets you run a network of separate websites from a single WordPress installation, sharing the same codebase, plugins, and themes while keeping their databases and content isolated. It is the architecture that powers sites like wordpress.com, large university networks, franchise websites, and SaaS platforms where each customer gets their own branded subsite. A multisite network can use either subdomains (client1.yourdomain.com) or subdirectories (yourdomain.com/client1/) as the URL structure, and the choice is made during network setup and is difficult to change later. The setup process involves adding a few constants to wp-config.php, adding new rewrite rules to .htaccess, and then navigating to Tools → Network Setup in the WordPress admin. After activation, a new “My Sites” menu appears in the toolbar and a “Network Admin” dashboard becomes available where the super-admin manages plugins, themes, and network-wide settings. Per-site admins can manage their own content but cannot activate network-inactive plugins or themes. Multisite is not the right choice for every scenario — if the sites have very different content structures, separate WordPress installs with shared code deployment (via Git as described in the Git commands guide) are often simpler to manage. Back up your site before enabling multisite; the process modifies wp-config.php and .htaccess and is not trivially reversible.
Problem: You want to manage multiple WordPress sites from a single admin panel and shared codebase, using WordPress Multisite.
Solution: Add the following lines to wp-config.php before the line /* That’s all, stop editing! */:
/* Enable WordPress Multisite */
define( 'WP_ALLOW_MULTISITE', true );
Then go to Tools → Network Setup, choose subdomain or subdirectory, click Install. WordPress will give you two code blocks to add: one for wp-config.php and one for .htaccess. They look similar to this:
/* Added by WordPress — do not remove or change! */
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', false ); // true for subdomains
define( 'DOMAIN_CURRENT_SITE', 'yourdomain.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );
/* Recommended additions */
define( 'WP_DEBUG', false );
define( 'WPMU_ACCEL_REDIRECT', true ); // use X-Accel-Redirect for media on Nginx
# .htaccess additions for WordPress Multisite (subdirectory install)
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# Add a 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]
NOTE: After enabling multisite, all plugins are deactivated and must be network-activated or activated per-site by the network super-admin. The database tables for each new site follow the pattern wp_2_posts, wp_2_postmeta, etc., where the number is the site ID — your network admin dashboard’s Sites page shows each site’s ID. Subdomain multisite requires either a wildcard DNS record (*.yourdomain.com) or individual DNS entries for each subsite.