How Much RAM Does Your Website Actually Need?

Most WordPress sites need between 512MB and 2GB of usable server RAM depending on traffic and stack complexity. The confusion comes from conflating two different numbers: PHP memory limits and total system RAM. Shared hosts market "unlimited" resources while quietly capping PHP memory at 64–128MB. Those are different constraints measuring different things, and only one of them matters when your site throws a fatal error.

Alon M. evaluates infrastructure products through technical specification analysis, real-world operator data, and direct experience managing environments at scale — not paid review partnerships.

Key Takeaways

  • PHP memory limit and server RAM are not the same thing — one caps a single script, the other is the total pool for the OS, database, and web server.
  • A standard WordPress site needs at least 256MB of PHP memory to operate reliably without fatal errors.
  • WooCommerce and membership sites bypass page caching for checkouts and logged-in sessions — their RAM requirements are substantially higher.
  • Shared hosting "unlimited" claims never apply to RAM. The host's internal PHP ceiling is the real limit, and it silently overrides your config.
  • VPS sizing must account for OS overhead, MySQL, caching layer, and concurrent PHP processes — not just the PHP memory limit alone.

The Difference Between PHP Memory and Server RAM

These two numbers are frequently conflated. They measure different things and have different implications for your infrastructure decisions.

PHP memory limit is a configuration setting in php.ini or wp-config.php. It caps the maximum RAM a single script execution can consume. If a plugin tries to process a large image import requiring 130MB but your limit is 128MB, the script terminates with a fatal error regardless of how much physical RAM the server has available.

Server RAM is the total memory available to the machine. It must support the operating system, the web server (Nginx or Apache), the database (MySQL or MariaDB), and every concurrent PHP process running at that moment.

On shared hosting, you have no visibility into total server RAM and limited control over the PHP limit. On a VPS, you control both. One practical implication worth understanding: setting a 512MB PHP memory limit on a server with only 1GB total RAM is dangerous. Two simultaneous users triggering complex processes will exhaust physical memory and likely crash the database.

RAM Requirements by Site Type

Site TypeMin PHP MemoryRecommended Server RAMNotes
Static HTML / brochure site64MB512MBNo database queries at runtime
WordPress blog (under 10k/month)128MB512MB–1GBCaching handles most load
WordPress + WooCommerce (small)256MB1–2GBCheckout process is memory-intensive
WordPress + WooCommerce (active)512MB2–4GBPeak concurrent sessions drive RAM need
Membership site / LMS512MB2–4GBSession data per logged-in user multiplies RAM use
Custom web app / APIVaries2GB+Depends on stack and concurrency

How to Measure What Your Site Is Actually Using

You do not need to guess. Two methods give you real numbers.

Application level: Query Monitor. The free Query Monitor plugin displays peak memory usage per page load in the WordPress admin bar. Navigate your most complex pages — the WooCommerce checkout, a heavy page-builder layout, a membership account page — and watch the peak memory figure. This is your baseline.

Server level: the CLI. On a VPS, run free -h. This shows total RAM, used, cached, and available in a readable format.

What to watch for: if your peak PHP memory usage is within 20% of your configured limit on a normal page load, you are close to the ceiling. If Query Monitor shows 98MB used against a 128MB limit, a background cron job or a modest traffic increase will trigger fatal errors. You need headroom, not just adequacy.

Why "Unlimited" Shared Hosting RAM Is a Marketing Term

Shared hosts use "unlimited" to describe disk space or bandwidth. They never apply it to RAM because they cannot — thousands of accounts share one physical server, and the host uses a governor to prevent any single account from consuming resources that crash everyone else.

Common PHP memory caps on shared platforms:

You cannot bypass these caps. Adding define('WP_MEMORY_LIMIT', '512M'); to your WordPress config looks like it should work. On most shared hosts, a server-level directive silently overrides it and your limit stays at whatever the host has set.

The real number that matters: ask support directly — "What is the maximum PHP memory limit I can use on this plan?" If they cannot give you a specific megabyte figure, the server is over-provisioned and they are managing that by keeping limits low.

Sizing a VPS for Your Actual RAM Needs

When moving to a VPS, you are responsible for the entire memory budget. Start with the base load before your site receives a single visitor.

OS baseline. A clean Ubuntu or Debian install consumes 200–400MB to keep the kernel and basic system services running.

MySQL. Depending on dataset size and query volume, MySQL holds indexes in memory for performance. Budget 300MB–1GB.

Caching layer. Redis or Memcached should receive a dedicated allocation of 128–512MB. Do not let the OS treat this as available general memory.

PHP worker pool. Each concurrent PHP-FPM worker process consumes up to your PHP memory limit. Size for peak concurrent requests, not average.

Example calculation for an active WooCommerce store with 512MB peak PHP usage:

A 2GB VPS runs this configuration dangerously close to the limit. A 4GB VPS handles it safely, and an 8GB VPS provides headroom for growth. The Contabo VPS 10 — 4 vCPU, 8GB RAM at $4.95/month — covers the workload above with room for traffic spikes.

What to Do Next

If your shared host caps PHP memory below what your site requires, the hardware is the constraint. See 5 signs your shared hosting is already failing for the diagnostic steps to confirm.

If you are not sure whether you need a VPS at all, work through when you should not upgrade to a VPS before making the call.

If you have confirmed the need and have the sysadmin skills to manage it, the Contabo VPS review breaks down their high-RAM instances from an infrastructure perspective.

Related:


Frequently Asked Questions

How much RAM does WordPress need?

The official WordPress minimum is 64MB of PHP memory. In practice, 64MB is insufficient for any modern site with active plugins. The realistic minimum for a stable production WordPress site in 2026 is 256MB of PHP memory, with 512MB recommended for anything running WooCommerce or a premium page builder.

What happens when a WordPress site runs out of memory?

The server terminates the script and returns a white screen or a 500 Internal Server Error. In your error logs this appears as: Fatal error: Allowed memory size of X bytes exhausted. The page does not load partially — it fails completely.

Is 1GB RAM enough for a VPS?

For a basic Linux server running a static site or a small, highly optimized WordPress blog with no e-commerce, yes. For WooCommerce, membership sites, or any environment running a control panel like cPanel, 1GB is not enough. After OS and database overhead, you have less than 300MB left for PHP processes.

About the Author

Alon M. spent a summer pulling Cat6e through drop ceilings before WiFi made that job obsolete — a fitting start to a career in IT infrastructure. He worked his way up from end-user support through server builds, progressively larger enterprise environments, and on into cloud and AI operations. He built OpsForge Labs because most hosting and infrastructure advice is written by people who have never had to manage something at scale, fix something broken at 2am, or justify a budget decision to someone who does not know what a VPS is.