Home / Guides / WordPress handbook / Chapter 18
WordPress handbook · Chapter 18 · Infrastructure
WordPress Multisite
Multisite runs many sites from one WordPress installation: one codebase, one database, shared users and network-wide plugins and themes. It saves effort for networks of similar sites and multiplies risk, because one bad plugin, one compromised super admin or one database problem affects every site at once.
On this page
When Multisite fits, and when it does not
- Many similar sites managed by one team (departments, franchises, campuses, language sites)
- Shared users across sites
- Centralised updates and plugin control
- Unrelated client sites (one compromise or outage hits all clients)
- Sites needing different plugins, PHP versions or hosting
- Sites that may later be sold or moved independently (extraction is work)
Architecture: database, files and URLs
- Network tables:
wp_site,wp_sitemeta(network options),wp_blogs,wp_blogmeta,wp_signups,wp_registration_log. - Per-site tables: the main site uses
wp_posts,wp_optionsand so on; site 2 useswp_2_posts,wp_2_options; site 3 useswp_3_*. - Shared:
wp_usersandwp_usermeta. A user's role on each site is stored aswp_2_capabilities,wp_3_capabilitiesand so on. - Uploads:
wp-content/uploads/sites/2/for site 2 onwards. - URL structure: subdirectories (
example.com/site2/) or subdomains (site2.example.com, which needs wildcard DNS and certificates); custom domains per site through built-in domain mapping. - Configuration:
MULTISITE,SUBDOMAIN_INSTALL,DOMAIN_CURRENT_SITE,PATH_CURRENT_SITE,SITE_ID_CURRENT_SITEandBLOG_ID_CURRENT_SITEinwp-config.php, plus Multisite-specific rewrite rules.
Roles, super admins and security
- Super Admins control the whole network: install plugins and themes for all sites, edit any site, manage users. Keep them to a minimum and require MFA.
- Site Administrators on Multisite cannot install plugins or themes and, by default, lack
unfiltered_html, which is a deliberate security boundary. Granting it to untrusted site admins lets them attack super admins with stored scripts. - Network-activated plugins run on every site. A vulnerability in one becomes a network-wide vulnerability.
- Open registration (users and/or sites) is a network setting; spam signups populate
wp_signupsandwp_usersacross the network. - Audit with
wp super-admin listand per-sitewp user list --url=site2.example.com --role=administrator.
Plugins and themes on a network
| Activation | Effect |
|---|---|
| Network-activated | Active on every site; settings may be network-wide or per site |
| Per-site activation | Installed once (by a super admin), activated individually by site admins if the network allows plugin menus |
| Must-use plugins | Active everywhere, always |
| Themes | Installed network-wide; "network enabled" to make them available to sites |
Many plugins are not fully Multisite-aware: they may create tables only for the main site, store settings in the wrong place, or run cron per site in ways that multiply load. Caching, security, backup and SEO plugins need explicit Multisite support. Check before installing.
Multisite troubleshooting
| Problem | Likely cause | Approach |
|---|---|---|
| Redirect loop or "Error establishing a database connection" on subsites after migration | DOMAIN_CURRENT_SITE or wp_blogs/wp_site domains still the old domain | Update constants and network tables; run wp search-replace with --network (or --url per site) |
| Subdomain sites unreachable | Missing wildcard DNS or certificate | Add wildcard DNS; wildcard certificate (DNS-01 validation) |
| Uploads 404 on subsites | Rewrite rules for Multisite missing; old ms-files setup on very old networks | Use the Multisite rewrite rules from Network Setup |
| Cron jobs not running on subsites | WP-Cron only triggers per site on visits | System cron iterating sites: wp site list --field=url | xargs -I{} wp cron event run --due-now --url={} |
| Database very large | Many sites × per-site tables, spam signups | Archive/delete unused sites; clean signups; per-site table review |
| One plugin breaks every site | Network-activated fatal error | Deactivate network-wide via WP-CLI (wp plugin deactivate slug --network) or folder rename |
wp site list --fields=blog_id,url,last_updated
wp plugin list --url=site2.example.com
wp search-replace 'old.example.com' 'new.example.com' --network --skip-columns=guid --dry-run
wp cache flush --url=site2.example.com
Rather have someone else keep WordPress healthy?
Our managed hosting and care plans cover updates, backups, security monitoring and fixes like the ones in this handbook, so you can get on with running the business.
See Hosting & Care