Back to Article List

VPS vs Shared Hosting at 5M Pageviews: Where Shared Caps Out

VPS vs Shared Hosting la 5M vizualizări: unde cedează shared-ul - VPS vs Shared Hosting at 5M Pageviews: Where Shared Caps Out

If you're pushing 5 million pageviews a month on a PHP site, shared hosting is almost certainly holding you back. That traffic averages out to roughly 2 visits per second, but real traffic is spiky, and a shared plan caps the two things those spikes demand most: concurrent PHP processes and CPU seconds. A modest VPS with 2–4 vCPUs and 4–8 GB RAM, for about the same money you'd spend on a premium shared plan, clears that ceiling with room to spare.

The Reddit thread that prompted this post is a perfect snapshot: someone asking for a sub-$70 VPS to serve 5M monthly pageviews. That's not a coincidence. 5M is right around the number where shared stops being a bargain and starts being a bottleneck. Let's pin down exactly where and why, then size the box properly so you're not overpaying.

Where shared hosting actually caps out

Shared hosting throttles on concurrency and CPU long before it runs out of bandwidth or disk. The limit you hit is the number of PHP processes you're allowed to run at once, not the number of pageviews on a spec sheet.

Most shared hosts enforce an entry process limit (often 20–40 simultaneous PHP processes) and a CPU/IO allowance via CloudLinux LVE. When you exceed the process cap, extra requests don't just slow down — they get queued or thrown a 508 Resource Limit Reached error. Your visitors see a dead page while your "unlimited bandwidth" plan sits there technically working as advertised.

Here's the math that matters. If your average PHP request takes 300ms to generate and you're allowed 25 concurrent processes, your hard ceiling is about 25 ÷ 0.3 = 83 dynamic requests per second. That sounds like plenty against a 2/sec average — until a newsletter blast or a Reddit front-page moment sends 150 people hitting an uncached page in the same second. Then half of them queue, response times balloon, and the LVE limiter starts killing processes to protect the other tenants on the server.

So the real question isn't "can shared handle 5M views." It's "can shared handle your worst 60 seconds." Usually it can't.

What a modest VPS buys you at the same budget

A VPS removes the artificial process cap and gives you dedicated CPU and RAM that nobody else can starve. That's the whole difference — you trade a babysat, throttled environment for raw capacity you control.

On shared hosting you're one of dozens of accounts on a box, and the host's job is to stop any single tenant from hogging resources. That protection is exactly what strangles you at scale. On a VPS the resources are yours: if you want 40 PHP workers running flat out during a traffic spike, nothing stops you.

At a similar monthly spend, here's the practical trade:

FactorPremium sharedModest VPS (2–4 vCPU)
Concurrent PHP processesCapped (~20–40)You decide (limited by RAM)
CPU during spikesThrottled by LVEDedicated vCPUs
Behaviour at the limit508 errors, queuingGraceful slowdown you can tune
Caching controlLimitedFull (Redis, OPcache, FastCGI cache)
Root accessNoYes
Who maintains itThe hostYou (unless managed)

The catch is that last row. A VPS is yours to run, which means updates, security patches and firewall rules land on your plate. If that's not where you want to spend your evenings, a managed VPS or a host that'll help you migrate and tune it is worth the small premium. TPC Hosting does free migration and keeps everything EU-hosted, so you're not re-platforming across continents just to move up a tier.

How to size CPU, RAM and PHP workers for 5M pageviews

For a typical PHP CMS at 5M pageviews a month, start with 2 vCPUs, 4 GB RAM and 8–12 PHP-FPM workers, then scale up only if real metrics tell you to. That's a sensible, non-wasteful baseline — not a guess pulled from a pricing page.

The worker count is the number that actually governs how many simultaneous requests you can serve. Size it from RAM, because each PHP-FPM worker holds memory and over-provisioning workers is how you trigger swapping and OOM kills.

  • Measure real worker memory: run ps --no-headers -o "rss,cmd" -C php-fpm8.2 | awk '{ sum += $1 } END { printf ("%d MB\n", sum/NR/1024) }' under load — this averages the resident memory across your running workers. Swap php-fpm8.2 for your actual version (for example php-fpm8.3) or it will match nothing. A WordPress worker commonly sits at 40–80 MB.
  • Budget RAM: reserve roughly 1–1.5 GB for the OS, MySQL/MariaDB and Redis, then divide what's left by per-worker memory. On 4 GB with 60 MB workers: (4096 − 1500) ÷ 60 ≈ 43 possible workers — but don't set it that high.
  • Set pm.max_children to what your CPU can actually push: with 2 vCPUs and 300ms requests, 8–12 busy workers keep both cores saturated. More workers than that just pile up a queue and increase latency.
  • Use pm = dynamic or ondemand: start low (pm.start_servers = 4), let it grow to max_children under pressure, and reclaim idle workers between spikes.

CPU is the harder ceiling once caching is in place. Two dedicated vCPUs comfortably serve a cached site at this traffic; it's uncached, dynamic requests (logged-in users, search, checkout) that burn cores. If your logged-in traffic is a big share of the 5M, step up to 4 vCPUs rather than piling on RAM you won't use.

Caching is what actually moves the ceiling

The single biggest lever at 5M pageviews isn't more hardware — it's serving most requests without touching PHP at all. A good cache turns a 300ms PHP render into a 5ms static response, which multiplies your effective capacity by 50x or more.

Stack your caching from the edge inward:

  • Full-page cache: Nginx FastCGI cache or Varnish in front of PHP-FPM. For anonymous visitors, every cached hit skips PHP and the database entirely. This alone takes the pressure off your worker count.
  • OPcache: on by default on sane setups, but verify. Set opcache.memory_consumption=256 and opcache.max_accelerated_files=20000 for a large CMS so compiled bytecode stays resident.
  • Object cache: Redis for sessions and query results. On WordPress, the Redis Object Cache plugin cuts repeat database work dramatically for logged-in and dynamic pages that can't be full-page cached.
  • A CDN for static assets: offload images, CSS and JS so your VPS spends its cores on HTML, not serving a 2 MB hero image 5 million times.

Get full-page caching right and a 2 vCPU / 4 GB box handles 5M pageviews without breaking a sweat, because 90%+ of requests never reach PHP. Skip caching and you'll outgrow a 4 vCPU box doing the same traffic. Caching is the difference, not the VPS size.

How to know you've actually outgrown shared

You've outgrown shared the moment you see 508 errors in your logs, or your host emails you about resource limits — not when you hit a magic pageview number. Watch for the symptoms, not the vanity metric.

Concrete signs it's time to move:

  • Intermittent 508 Resource Limit Reached errors, usually during your busiest hour.
  • TTFB that's fine at 3am and awful at peak — a classic sign of process queuing.
  • Your host throttling you, or suggesting you "optimise" every few weeks.
  • You want Redis, a custom PHP version, or a FastCGI cache config the shared panel won't let you touch.

If two or more of those ring true, a VPS pays for itself in recovered sales and sanity. The move doesn't have to be a weekend lost to server admin, either — TPC Hosting migrates your site for free, runs on EU infrastructure that keeps you GDPR-friendly, and gives you 30 days to back out if it isn't the right fit. If you get stuck mid-migration, the AI on chat answers any hour and real engineers follow up during business hours, so you're not debugging an FPM config alone at midnight.

FAQ

How many pageviews can shared hosting really handle?

Shared hosting typically handles 1–3M pageviews a month for a cached PHP site, but the real limit is concurrency, not total views. Most shared plans cap you at 20–40 simultaneous PHP processes, so a traffic spike can trigger 508 errors long before you hit any monthly number.

Is a $70 VPS enough for 5 million pageviews a month?

Yes, a VPS in that price range is plenty for 5M pageviews if you cache properly. A 2–4 vCPU box with 4–8 GB RAM and full-page caching serves that traffic comfortably, since most requests never reach PHP.

How many PHP-FPM workers do I need for a busy site?

Start with 8–12 workers for a 2 vCPU VPS and size the maximum from RAM, not pageviews. Measure real per-worker memory under load, reserve 1–1.5 GB for the OS and database, then divide the rest to set pm.max_children.

Will moving from shared to VPS cause downtime?

It shouldn't, if you migrate with DNS prepared in advance and test on the new server first. TPC Hosting handles the migration for you and gives you 30 days to back out, so you can verify everything works before cutting over.

Do I need a managed VPS or can I run it myself?

If you're comfortable with the command line, updates and firewall rules, an unmanaged VPS is cheaper and gives full control. If server maintenance isn't how you want to spend your time, a managed VPS or a host that helps with setup and tuning is worth the small premium.