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.

Updated · 3 min read · Level: Expert

On this page
  1. When Multisite fits, and when it does not
  2. Architecture: database, files and URLs
  3. Roles, super admins and security
  4. Plugins and themes on a network
  5. Multisite troubleshooting

When Multisite fits, and when it does not

Good fits
  • Many similar sites managed by one team (departments, franchises, campuses, language sites)
  • Shared users across sites
  • Centralised updates and plugin control
Poor fits
  • 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_options and so on; site 2 uses wp_2_posts, wp_2_options; site 3 uses wp_3_*.
  • Shared: wp_users and wp_usermeta. A user's role on each site is stored as wp_2_capabilities, wp_3_capabilities and 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_SITE and BLOG_ID_CURRENT_SITE in wp-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_signups and wp_users across the network.
  • Audit with wp super-admin list and per-site wp user list --url=site2.example.com --role=administrator.

Plugins and themes on a network

ActivationEffect
Network-activatedActive on every site; settings may be network-wide or per site
Per-site activationInstalled once (by a super admin), activated individually by site admins if the network allows plugin menus
Must-use pluginsActive everywhere, always
ThemesInstalled 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

ProblemLikely causeApproach
Redirect loop or "Error establishing a database connection" on subsites after migrationDOMAIN_CURRENT_SITE or wp_blogs/wp_site domains still the old domainUpdate constants and network tables; run wp search-replace with --network (or --url per site)
Subdomain sites unreachableMissing wildcard DNS or certificateAdd wildcard DNS; wildcard certificate (DNS-01 validation)
Uploads 404 on subsitesRewrite rules for Multisite missing; old ms-files setup on very old networksUse the Multisite rewrite rules from Network Setup
Cron jobs not running on subsitesWP-Cron only triggers per site on visitsSystem cron iterating sites: wp site list --field=url | xargs -I{} wp cron event run --due-now --url={}
Database very largeMany sites × per-site tables, spam signupsArchive/delete unused sites; clean signups; per-site table review
One plugin breaks every siteNetwork-activated fatal errorDeactivate 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