How Many Websites Can a 4 GB, 8 GB, or 16 GB VPS Actually Host?

Updated on Nov 6, 2026
Mila H
8 MINS READ
Table of Contents
How Many Websites Can a VPS Host?

Most guides give a fixed number, like a 4 GB VPS can host 50 sites. That number means nothing without details. The real answer depends on site type, traffic, cache, and database load. In this guide, we answer how many websites a VPS can host by using clear assumptions and numbers you can measure on your own server.

Estimated Site Limits by RAM and CPU

These are safe starting estimates for sites with low to normal traffic, about 5,000 to 10,000 visits per month for each WordPress site. They assume page cache is on:

VPS size Static sites WordPress sites WooCommerce stores
4 GB RAM, 2 vCPU 50 to 100 8 to 12 1 to 2
8 GB RAM, 4 vCPU 150 to 300 20 to 30 3 to 5
16 GB RAM, 8 vCPU 400+ 40 to 60 8 to 12

These are estimates, so consider them as a first answer to how many websites a VPS can host on each plan. One busy site can use more than 20 quiet ones. You can use the steps below to check your own numbers.

How Many Websites Can a VPS Host?

Before we look at each scenario, here are the base settings and numbers we use. If your setup is different, change these numbers and the results will change too.

  • OS: Ubuntu 24.04 LTS, Nginx, PHP-FPM, MariaDB, and Redis on one server.
  • OS, Nginx, and monitoring tools use about 0.5 GB of RAM.
  • A WordPress PHP worker uses about 60 to 100 MB. A WooCommerce worker uses about 100 to 150 MB.
  • A cached page is served in a few milliseconds. An uncached WordPress page takes about 200 to 500 ms of CPU time.
  • An average page weighs about 2 MB.
  • Plans include about 3 TB of monthly bandwidth, like the Linux VPS plans listed with 2 GB to 16 GB of RAM.

Plugins and themes change how much memory each worker uses. Check your own server before you trust any.

Scenario 1: Static Sites

Static sites are plain HTML, CSS, JavaScript, and images. There is no PHP and no database. Nginx serves files directly from disk.

  • CPU: Almost none. One vCPU can serve hundreds of requests per second.
  • Memory: Nginx needs very little. The OS file cache does most of the work.
  • PHP, DB, cache: Not needed.
  • Bandwidth: This is the first limit. 3 TB per month is about 1.5 million page views at 2 MB each.

If you ask how many websites a VPS can host with static files only, the answer is hundreds. Disk space and bandwidth end up as the limit before RAM does.

Scenario 2: WordPress Sites

WordPress runs PHP on every uncached request and talks to a database. Cache is what makes many sites possible.

First, you must use a supported PHP version. PHP 8.4 and 8.5 are in active support, and PHP 8.3 gets security fixes only until 31 December 2027. Ubuntu 24.04 includes PHP 8.3 and MariaDB 10.11 in its default repositories.

Bash
sudo apt updatesudo apt install nginx mariadb-server redis-server php-fpm php-mysql php-redis php-curl php-gd php-mbstring php-xml php-zip php-intl -yphp -v

PHP workers

You must plan workers by memory and CPU. A good start is 2 to 3 workers for each vCPU. Edit the pool file. Change 8.3 if your PHP version is different:

Bash
sudo nano /etc/php/8.3/fpm/pool.d/www.conf
pm = dynamicpm.max_children = 12pm.start_servers = 4pm.min_spare_servers = 2pm.max_spare_servers = 6pm.max_requests = 500pm.status_path = /fpm-statusrequest_slowlog_timeout = 3sslowlog = /var/log/php8.3-fpm.slow.log
Bash
sudo php-fpm8.3 -tsudo systemctl restart php8.3-fpm

Example for an 8 GB server: the OS uses 0.5 GB, the database uses 2 GB, and Redis uses 0.25 GB. That leaves about 5 GB for PHP.

If each worker uses 80 MB, memory alone could fit about 60 workers. But the CPU will run out first. On 4 vCPUs, 12 to 16 workers is a safer limit.

Page Cache

You can use Nginx FastCGI cache, so most visits never touch PHP. Add this in the http block of /etc/nginx/nginx.conf:

fastcgi_cache_path /var/cache/nginx levels=1:2 keys_zone=WPCACHE:50m max_size=1g inactive=60m;

Then use it in each site's PHP location, and skip cache for logged-in users and cookies:

fastcgi_cache WPCACHE;fastcgi_cache_valid 200 301 302 10m;fastcgi_cache_bypass $skip_cache;fastcgi_no_cache $skip_cache;add_header X-Cache $upstream_cache_status;

Define $skip_cache with a map for logged-in users, so they always see fresh pages. Check it works:

Bash
curl -I https://example.com | grep -i x-cache

Database and Object Cache

Set the MariaDB buffer pool to about 25 to 40 percent of RAM when it shares the server with PHP. Create /etc/mysql/mariadb.conf.d/99-custom.cnf:

[mysqld]innodb_buffer_pool_size = 1Gmax_connections = 100slow_query_log = 1long_query_time = 1slow_query_log_file = /var/log/mysql/slow.log
Bash
sudo systemctl restart mariadb

Then, limit Redis in /etc/redis/redis.conf and restart it:

maxmemory 256mbmaxmemory-policy allkeys-lru
Bash
sudo systemctl restart redis-server

Install a Redis object cache plugin in each site. Give each site a unique WP_REDIS_PREFIX so sites do not mix data.

For a mix of quiet blogs and business sites, the table above gives a good start. The answer to how many websites a VPS can host is 8 to 12 sites on 4 GB, 20 to 30 on 8 GB, and 40 to 60 on 16 GB.

Scenario 3: WooCommerce Stores

WooCommerce is heavier. Cart, checkout, and account pages cannot be page-cached, so every visit uses PHP and the database. WooCommerce recommends PHP 8.3 or newer, MySQL 8.0 or MariaDB 10.6 or newer, HTTPS, and a WordPress memory limit of 256 MB or more.

Set the memory limit in wp-config.php:

define('WP_MEMORY_LIMIT', '256M');

Plan for these values:

  • CPU: 1 vCPU for each 3 to 5 checkouts per second, as a start.
  • PHP workers: 3 to 4 for each vCPU, using about 150 MB each.
  • Database: Give it more RAM. Use 40 to 50 percent of memory for innodb_buffer_pool_size on a store-focused server.
  • Cache: Page-cache product and category pages only. Bypass cart, checkout, and my-account.
  • Bandwidth: Product images are large. Use WebP and a CDN.

When you plan a shop, the answer to how many websites a VPS can host is usually one to three busy stores per 4 to 8 GB. The server should not run many other sites at the same time.

VPS Limits to Watch

Fixed site counts fail, but measured limits work, and they give the real answer to how many websites a VPS can host. Use these as warning levels:

Metric Healthy Warning Act now
CPU (average) Under 60% 60 to 80% Over 80% for 15 min
Load average Below vCPU count Near vCPU count Above 2x vCPU count
RAM used (excluding cache) Under 70% 70 to 85% Over 85% or swap grows
Swap in use 0 Some Constant swap activity
Disk iowait Under 5% 5 to 15% Over 15%
Disk space Under 70% 70 to 85% Over 85%
Cache hit rate Over 80% 50 to 80% Under 50%
Monthly bandwidth Under 60% 60 to 80% Over 80%

How to Monitor Your VPS

To know how many websites a VPS can host in your case, run these commands during a busy hour.

Check memory and swap with the command below:

Bash
free -h

Check CPU, load, and iowait over time with the commands below:

Bash
sudo apt install sysstat htop vnstat -yvmstat 5 5iostat -x 5 3

Check how many PHP workers are running and how much memory each one uses:

Bash
ps --no-headers -o rss -C php-fpm8.3 | awk '{s+=$1; n++} END {print n, "workers, avg", s/n/1024, "MB"}'

Look for the max children warning in the PHP log:

Bash
sudo grep -i "max_children" /var/log/php8.3-fpm.log

Check for out-of-memory kills with the following command:

Bash
sudo journalctl -k | grep -i "out of memory"

Also, review slow queries and slow PHP requests in the slow logs set above. Track monthly bandwidth:

Bash
vnstat -m

For long-term graphs and alerts, you can add Netdata or Prometheus with Grafana.

When to Add a Second VPS or Move to Dedicated

Once you know how many websites a VPS can host safely, add a second VPS when:

  • One heavy site slows down the others. Move that site to its own server.
  • The database needs more RAM than PHP leaves free. Move MariaDB to a separate VPS.
  • RAM stays above 85 percent after you tune workers and cache.

Choose dedicated hardware when the same question keeps giving you a smaller number, or when:

  • CPU stays above 80 percent on the biggest VPS size.
  • Disk iowait remains high due to heavy database writes.
  • You run many busy WooCommerce stores, or need more than 3 TB of traffic each month.
  • You need full control of the hardware and steady, non-shared performance.

At that point, dedicated servers with full hardware control give you all the CPU cores, RAM, and disks to yourself, with no noisy neighbors.

Conclusion

The best answer to how many websites a VPS can host is a range you measure, not a fixed number. Start with the table in the guide, set up page cache, PHP workers, and database limits, then watch the thresholds.

Scale up, split services, or move to dedicated hardware only when the data shows a clear bottleneck.