keepcalculator

06 Numbers and Powers

WordPress Multisite Server Architecture Guide

Card No. 06·69151 · Updated · Standard formula, shown below

To host multiple WordPress sites efficiently, you need a server architecture that isolates each site’s resources, handles traffic spikes, and simplifies maintenance. The two primary approaches are shared hosting (one server, one WordPress install per site) and WordPress Multisite (one WordPress core, multiple sites). This guide explains the key architectural patterns, their trade-offs, and how to choose the right one for your needs.

Shared vs. Dedicated Resources

Every WordPress site needs a web server (Apache, Nginx, or LiteSpeed), a database (MySQL or MariaDB), and PHP. On a single server, you can run multiple sites by giving each its own document root and database, or by using virtual hosts (vhosts) that map different domain names to different folders. This is the classic “shared hosting” model. The server’s CPU, RAM, and disk are shared, so a traffic spike on one site can slow down all others. For low-traffic sites, this is often sufficient and the cheapest option.

Dedicated resources mean each site gets its own server, or at least its own container or virtual machine. This provides strong isolation: one site crashing or being hacked does not affect others. Costs are higher, but performance is predictable. A middle ground is a virtual private server (VPS) with multiple sites, where you control resource limits per site using tools like PHP-FPM pools or Docker containers.

WordPress Multisite: One Core, Many Sites

WordPress Multisite is a built-in feature that lets you run multiple sites from a single WordPress installation. All sites share the same core files, plugins, and themes, but each has its own content, users, and database tables. This drastically reduces maintenance: you update WordPress, plugins, and themes once, and the change applies to every site. It also saves disk space because there is only one copy of the code.

However, Multisite introduces a single point of failure: if the core is compromised, all sites are affected. Plugin and theme compatibility must be tested across all sites, and some plugins are not Multisite-compatible. Multisite is ideal for networks of similar sites, such as a university’s department blogs, a franchise’s local pages, or a company’s multi-language sites. It is less suitable for agencies hosting completely unrelated client sites with different plugin needs.

Server Stack Options: LAMP, LEMP, and Managed

The most common stack is LAMP (Linux, Apache, MySQL, PHP). It is well-documented and works with almost every hosting provider. LEMP (Linux, Nginx, MySQL, PHP) replaces Apache with Nginx, which handles concurrent connections more efficiently and uses less memory. For high-traffic sites, Nginx is often preferred. LiteSpeed is a commercial alternative that is compatible with Apache’s .htaccess rules and includes built-in caching.

Managed WordPress hosting (e.g., WP Engine, Kinsta, Flywheel) provides a pre-configured stack optimized for WordPress, with automatic backups, staging environments, and built-in caching. These services often use a container-based architecture where each site runs in its own isolated environment, giving you the isolation of dedicated resources without the server administration overhead. The trade-off is higher cost and less control over the server configuration.

Database Architecture: Separate or Shared

Each WordPress site needs its own database. On a single MySQL server, you can create multiple databases, one per site. This is the simplest approach and works for up to a few dozen sites. For larger numbers, database performance can become a bottleneck. Options include using separate MySQL instances per site, or using a database cluster with replication for read-heavy workloads.

In Multisite, all sites share one database, but each site’s tables are prefixed (e.g., wp_2_posts). This can lead to a very large database that is harder to back up and restore. For large Multisite networks, some administrators use external databases or sharding, but that adds complexity. A common best practice is to use a managed database service (like Amazon RDS) that handles replication, backups, and scaling automatically.

Scaling and Caching Strategies

As traffic grows, you need to scale. Vertical scaling means adding more CPU and RAM to the same server. This is simple but has limits. Horizontal scaling means adding more servers and distributing traffic with a load balancer. WordPress is stateless, so you can run multiple web servers behind a load balancer, but you must share the uploads folder (using NFS or an object store like S3) and use a central database.

Caching is critical for performance. Page caching (e.g., WP Super Cache, W3 Total Cache) stores fully rendered HTML pages, reducing PHP and database load. Object caching (e.g., Redis, Memcached) stores database query results. For a multi-site server, a shared object cache can be configured per site or per network. A content delivery network (CDN) can also offload static assets like images and CSS. Without caching, even a powerful server can be overwhelmed by a few hundred concurrent visitors.

Security and Isolation Best Practices

When hosting multiple sites, a breach on one site can compromise others if they share the same server user. On a traditional shared host, each site runs under the same user, so a hacked script can read other sites’ files. To isolate, use PHP-FPM with separate pool users, or run each site in a separate container or VM. File permissions should be set so that each site’s files are owned by its own user.

Other best practices include: keeping WordPress core, plugins, and themes updated; using strong passwords and two-factor authentication; limiting login attempts; and using a web application firewall (WAF). Regular backups are essential, and they should be stored off-site. For Multisite, be extra careful with plugin updates, as a faulty update can take down the entire network.

Backup and Deployment Workflows

Backing up multiple sites can be automated with scripts or tools like UpdraftPlus, BackWPup, or server-level snapshots. For a single server, a full server snapshot is the simplest, but it restores all sites at once. For per-site backups, you need to back up the site’s files and database separately. A common schedule is daily database backups and weekly full backups, but this depends on how often content changes.

Deployment workflows differ. For a single site, you can use Git to push code changes to the server. For multiple sites on one server, you can use a staging environment to test updates before applying them to all sites. Managed hosts often provide a one-click staging clone. For Multisite, you can test on a staging copy of the entire network, but that requires duplicating the database, which can be large.

Cost Comparison and Choosing the Right Approach

Costs vary widely. Shared hosting can be as low as a few dollars per month per site, but you get limited performance and security. A VPS with 2 CPU cores and 4 GB RAM can host 5-10 low-traffic sites for around $20-40 per month. Managed WordPress hosting typically charges per site, starting at $20-30 per month per site, but includes many features. Multisite on a single VPS can be very cost-effective for a large network, as you only pay for one server.

To choose, consider: how many sites, how much traffic, how different the sites are, and your technical skill. If you have 5 or fewer unrelated low-traffic sites, a VPS with separate vhosts is a good balance. If you have 20+ similar sites, Multisite is worth learning. If you need maximum performance and don’t want to manage servers, managed hosting is the safest bet, albeit more expensive.

Frequently Asked Questions

What is the difference between WordPress Multisite and multiple installations?

Multiple installations mean each site has its own WordPress core, plugins, and themes in separate folders. Multisite uses one core, and all sites share the same plugins and themes. Multisite is easier to manage but less flexible; separate installations are more isolated but require updating each site individually.

Can I use Multisite for client websites?

Yes, but it is not recommended if clients need to install their own plugins or themes, or if they want full control. Multisite is better for a network where all sites are similar and you control the code. For diverse client sites, separate installations are safer.

How many WordPress sites can I host on one server?

There is no fixed number. It depends on traffic, plugins, and server resources. A small VPS with 2 GB RAM can handle 5-10 low-traffic sites. A dedicated server with 32 GB RAM can handle hundreds of low-traffic sites, but you will need caching and possibly a database server on a separate machine.

Should I use Nginx or Apache for multiple WordPress sites?

Both work. Nginx generally uses less memory and handles concurrent connections better, making it a good choice for many sites on one server. Apache is easier to configure with .htaccess and is more widely documented. If you use Nginx, you need to configure server blocks instead of .htaccess.

How do I isolate sites on a VPS?

Use PHP-FPM with a separate pool per site, each running under its own system user. This prevents one site from reading another’s files. Alternatively, use Docker containers, where each site runs in its own container with its own file system and network namespace. This provides stronger isolation but adds complexity.

What is the best way to back up multiple WordPress sites?

Use a plugin that supports scheduled backups to cloud storage (e.g., UpdraftPlus to S3). For server-level backups, use snapshots if your provider offers them. For Multisite, back up the entire database and the wp-content folder. Always test restores regularly.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →