Running each small website on its own server wastes money and multiplies maintenance. Running dozens of sites carelessly on one server creates a different problem: one compromised plugin can expose every site. The right setup sits between the two: many sites on one well-sized VPS, each isolated from the others. This guide shows how, using Nginx, PHP-FPM and MariaDB; the same structure applies to other stacks.
The Layout
/var/www/site-a.com/ owned by user site_a PHP-FPM pool "site_a" DB site_a / user site_a
/var/www/site-b.com/ owned by user site_b PHP-FPM pool "site_b" DB site_b / user site_b
Nginx: one server block per domain, each passing PHP to its own pool socket
Step 1: One Linux User per Site
sudo useradd --system --create-home --home-dir /var/www/site-a.com --shell /usr/sbin/nologin site_a
sudo chmod 750 /var/www/site-a.com
sudo usermod -aG site_a www-data # Nginx can read static files, other sites cannot
Files are owned by the site's user and not readable by other sites' users. If one site is compromised, the attacker runs as that user and cannot read the other sites' files or configuration.
Step 2: A PHP-FPM Pool per Site
# /etc/php/8.3/fpm/pool.d/site_a.conf (path depends on your PHP version)
[site_a]
user = site_a
group = site_a
listen = /run/php/site_a.sock
listen.owner = www-data
listen.group = www-data
pm = ondemand
pm.max_children = 6
pm.process_idle_timeout = 30s
php_admin_value[open_basedir] = /var/www/site-a.com:/tmp
php_admin_value[upload_max_filesize] = 32M
pm = ondemand starts workers only when a site gets traffic, which saves memory when many sites are quiet. pm.max_children caps how much memory one busy site can use, protecting the others. Remove or disable the default www pool if you do not use it, then reload PHP-FPM.
Step 3: An Nginx Server Block per Domain
server {
listen 80;
server_name site-a.com www.site-a.com;
root /var/www/site-a.com/public;
index index.php index.html;
access_log /var/log/nginx/site-a.access.log;
error_log /var/log/nginx/site-a.error.log;
location / { try_files $uri $uri/ /index.php?$args; }
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/site_a.sock;
}
location ~ /\.(?!well-known) { deny all; }
}
Separate log files per site make it easy to see which site causes load. Our reverse proxy guide covers non-PHP applications (Node.js, Python) side by side with these sites.
Step 4: A Database and User per Site
CREATE DATABASE site_a CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'site_a'@'localhost' IDENTIFIED BY 'unique-long-password';
GRANT ALL PRIVILEGES ON site_a.* TO 'site_a'@'localhost';
Never share one database user across sites; a leaked password should expose only one site.
Step 5: Certificates for Every Domain
sudo certbot --nginx -d site-a.com -d www.site-a.com
sudo certbot --nginx -d site-b.com -d www.site-b.com
Certbot renews them all automatically. Each domain's DNS must point to the server before issuing (see our Let's Encrypt guide).
Step 6: Plan Resources
| Item | Rule of thumb |
|---|---|
| PHP memory | Per-worker memory × max_children for the sites busy at the same time |
| Database | One shared MariaDB with a buffer pool sized for all sites' hot data |
| Caching | Page caching on every site; it is the biggest saver of CPU |
| Disk | Sum of all sites' files and databases, plus logs, plus 20% free |
Quiet sites cost very little with ondemand pools and caching. A few busy sites, especially shops, determine the size you need.
Step 7: Back Up Each Site Separately
Back up each site's files and database as a separate archive, so you can restore one site without touching the others. Copy archives off the server and keep several days of history. Test restoring a single site.
Keeping Many Sites Updated
The real cost of hosting many sites is maintenance. Outdated plugins and themes are the most common way small sites are compromised, and on a shared server one compromised site is a risk to the rest.
- Use WP-CLI or each CMS's command-line tools to update all sites from one script:
sudo -u site_a wp --path=/var/www/site-a.com/public plugin update --all. - Remove plugins and themes that are not in use.
- Keep PHP itself on a supported version; plan upgrades by testing each site on staging first.
- Scan for unexpected file changes and watch error logs per site.
- Keep an inventory of sites, owners, domains and renewal dates, so nothing is forgotten when a domain or client changes.
Adding a New Site in Five Minutes
Once the pattern is set, script it: create the user, directory, PHP-FPM pool, Nginx server block, database and certificate from one command with the domain as the argument. A short Bash script or an Ansible role makes every new site consistent and removes the risk of a forgotten permission (see our Ansible guide).
Do You Need a Control Panel?
Control panels (open-source or commercial) automate users, pools, databases and certificates for many sites, and are useful if non-technical staff manage sites. They add software to maintain and sometimes licence costs. The manual setup above is lighter and transparent; scripts or Ansible can automate it.
When to Split Sites Off
- One site uses most of the server's CPU or memory at peak.
- A site has stricter security or compliance needs than the others.
- A client needs a separate bill or server access.
- Maintenance on one site (major upgrades) keeps affecting others.
For reselling hosting to clients with their own control panels, see our reseller hosting option.
Email for Many Sites
Do not run a mail server for all client domains on the web server. Send website email (contact forms, orders) through a transactional email service with SPF and DKIM records per domain, and keep mailboxes with a dedicated email provider. One spammy site on a shared mail server can get every domain's email blocked.
SkyRainCloud Plans for This Workload
Ten to fifteen small cached WordPress sites typically fit on 4 vCores / 16 GB; an agency with dozens of client sites or several busy shops should start at 8 vCores / 32 GB. Size by the sum of peak memory across sites, not by site count.
AMD EPYC 7C13 VPS
Dedicated KVM vCores on AMD EPYC 7C13 (up to 3.70 GHz) with DDR4 ECC memory, NVMe SSD and an unmetered 1 Gbps port.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| VPS 1 — AMD | 2 | 8 GB DDR4 ECC | 40 GB NVMe SSD | 1 Gbps, unmetered | ₹649/month | Websites, small APIs, bots, staging and VPN servers | Order |
| VPS 2 — AMD | 4 | 16 GB DDR4 ECC | 80 GB NVMe SSD | 1 Gbps, unmetered | ₹1,299/month | WooCommerce, Node.js/Python backends, Docker Compose stacks, CI runners | Order |
| VPS 3 — AMD | 8 | 32 GB DDR4 ECC | 150 GB NVMe SSD | 1 Gbps, unmetered | ₹2,499/month | Production databases, high-traffic sites, multi-container apps | Order |
| VPS 4 — AMD | 16 | 64 GB DDR4 ECC | 250 GB NVMe SSD | 1 Gbps, unmetered | ₹4,899/month | Large production workloads, SaaS platforms, analytics, in-memory caches | Order |
Prices are monthly in INR as listed on the SkyRainCloud store (verified 2026-11-14). Stock and final pricing are shown on the product page at checkout.
Frequently Asked Questions
How many websites can one VPS host?
How do I isolate sites on one server?
Can one hacked site affect the others?
Do I need a separate IP address per site?
How do I get SSL certificates for many domains?
Should every site have its own database server?
What does pm = ondemand do?
How do I see which site is using resources?
top shows processes by pool user, and each site's access log shows its traffic.