One VPS can host many websites. A web server such as Nginx, Apache or IIS can serve dozens of domains from the same machine, each with its own files and settings. The question is how big that server should be, and whether everything belongs on one server at all. This guide walks you through the estimate and the trade-offs.
Before you start
For each site, note:
- The type: static site, WordPress, shop, custom app.
- Rough monthly visitors and the busiest hour.
- Database size and media library size.
- Any special software it needs, such as a different PHP version or Node.js.
You also need to decide how you will manage the sites: by hand with config files, or with a control panel. If you want cPanel, Plesk or DirectAdmin, buy a licence from the vendor or use a free alternative.
How one server hosts many sites
The web server looks at the domain name in each request and serves the matching site. Nginx calls these server blocks, Apache calls them virtual hosts, and IIS calls them sites with host-name bindings.
All sites share the same pool of RAM, CPU and disk. Most of the time they are not all busy at once, which is why several small sites fit comfortably on one modest server.
Estimate the resources
RAM
Start with a base for the operating system, web server and database server, then add an amount for each site's PHP or app workers. Busy sites and shops need more than quiet brochure sites. Add 25–50% headroom on the total. See how much RAM a VPS needs.
CPU
Cached sites use little CPU. Sites with many logged-in users, shops or heavy plugins use much more. If two busy sites peak at the same time of day, size for both peaks together.
Storage
Add up each site's files, uploads and database, then add room for logs, updates and local backups. Keep at least 20–25% of the disk free.
A worked example
Five small WordPress sites with caching and modest traffic usually fit on a server with a few gigabytes of RAM and 2 vCPUs. Add a busy WooCommerce shop and you should plan for more memory and cores, or move the shop to its own server.
One big server vs several smaller ones
One bigger server
- Simpler: one machine to update, secure and back up.
- Efficient: quiet sites share spare capacity with busy ones.
- Shared risk: if the server goes down, or one site is hacked, every site is affected.
- Shared limits: one heavy site can slow the others.
Several smaller servers
- Isolation: a problem on one server stays there.
- Fit: each server can run the software versions that site needs.
- More work: more machines to update and monitor.
A common middle path: keep small sites together on one server, and give a shop or a high-traffic site its own.
Keep sites separate on one server
If you share a server, reduce the blast radius:
- Run each site as its own system user with its own PHP-FPM pool.
- Give each site its own database and database user.
- Use correct file permissions so one site cannot write to another.
- Back up each site separately so you can restore one without touching the rest.
Check it works
After moving the sites over, watch the server during a busy period:
free -h
uptime
df -hThese show available memory, load averages and disk use on Linux. On Windows, use Task Manager → Performance. If memory is tight or load stays above your vCPU count, upgrade or split off the busiest site.
Troubleshooting
- One site slows all the others: find it with
topor by checking which PHP pool is busiest, then cache it, fix it or move it. - Sites need different PHP versions: run multiple PHP-FPM versions side by side, or move one site to another server.
- A hacked site infects others: separate users and permissions limit this. See WordPress file permissions.
- Domain shows the wrong site: the web server cannot match the host name and falls back to the default site. Check the domain is listed in the right server block or binding.
Next steps
- Point each domain at the server: point a domain to your VPS.
- Pick a panel if you want one: best control panel for WordPress.
