“How much RAM does WordPress need?” gets asked in every hosting forum, and the answers range from “256 MB is fine” to “get 8 GB to be safe”. Both are wrong for most sites, and the second one costs real money every month.
The honest answer is that WordPress itself barely uses any memory. What eats RAM is everything around it: the database, the PHP workers that handle uncached requests, and whatever your plugins load on every page. Once you know how to add those up, you can size a server in about five minutes and stop paying for headroom you never touch.
The short answer
| Site | RAM that works | What pushes you up a tier |
|---|---|---|
| Blog or brochure site, 10-20 plugins, page caching on | 1 GB with swap, 2 GB comfortable | A heavy page builder, lots of logged-in editors |
| Business site with forms, SEO plugin, a builder | 2 GB | Membership plugins, uncached search |
| WooCommerce store | 4 GB | Every cart and checkout request skips the page cache |
| Several client sites on one server | 4-8 GB | Sum of each site’s peak, not the average |
If you only read one line: start at 2 GB, turn on page caching, and only buy more when you have measured that you need it.
Where the memory actually goes
A WordPress server is four things sharing the same RAM. Here is a realistic budget for a normal site on a small VPS:
| Component | Typical use | Notes |
|---|---|---|
| Operating system + nginx | 150-250 MB | Mostly fixed. nginx serving cached pages costs almost nothing. |
| MySQL or MariaDB | 300-500 MB | Dominated by innodb_buffer_pool_size. The default is 128 MB and most small sites want 256-512 MB. |
| PHP-FPM workers | 40-100 MB each | This is the variable. Plugin-heavy sites sit at the top of that range. |
| Object cache (Redis) | 50-150 MB | Optional, and usually the best RAM you will ever spend. |
The PHP line is the one that decides your server size. Each concurrent uncached request needs its own PHP worker, and each worker holds your whole plugin stack in memory while it runs. That is why a site with 5,000 cached visitors a day can run happily on 1 GB while a site with 300 visitors and ten logged-in editors struggles on 2 GB.
The formula
You can size a server with one line of arithmetic:
RAM needed = OS (~200 MB) + database (~400 MB) + (PHP workers x MB per worker) + object cache + 20% headroom
Worked example for a typical business site: 200 + 400 + (8 workers x 70 MB = 560) + 100 = 1,260 MB, plus 20% is roughly 1.5 GB. A 2 GB server runs it with room to spare. Double the workers for a busy WooCommerce shop and you land near 2.5 GB before headroom, which is why 4 GB is the realistic floor for a store.
The worker count is your pm.max_children setting in PHP-FPM. Set it from the formula, not the other way around. A server that is allowed more workers than it has memory for does not slow down gracefully. It starts swapping, then the kernel kills MySQL, and your site shows “Error establishing a database connection” at the exact moment it is busiest.
Measure yours in two commands
Guessing the MB-per-worker number is where most sizing goes wrong, and you do not have to guess. SSH into the server and run:
ps -ylC php-fpm8.3 --sort:rss | awk 'NR>1 {sum+=$8; n++} END {print sum/n/1024 " MB avg per worker"}'
free -m
The first gives you the real average size of your PHP workers with your actual plugins loaded. The second shows how much is genuinely free once the page cache is counted. Take the average from a busy hour, not from 3am, and plug it into the formula above.
If you can’t run those two commands because your host gives you no shell access, that is worth knowing too. You are paying for a server you are not allowed to look inside.
What about WP_MEMORY_LIMIT?
This is the most misunderstood setting in WordPress. WP_MEMORY_LIMIT is not how much RAM your site uses. It is the ceiling a single PHP request is allowed to reach before it errors. WordPress defaults it to 40 MB for a single site and raises it to 256 MB (WP_MAX_MEMORY_LIMIT) for admin screens.
Raising it to 512 MB does not make anything faster. It just lets one bad plugin eat half your server before it gets stopped. If you are hitting “Allowed memory size exhausted” errors, find the plugin doing it before you raise the limit.
Four ways to need less RAM
- Page caching first. A cached page is a static file served by nginx. It uses no PHP worker and no database query. This single change often halves the RAM a site needs.
- Add an object cache. Redis keeps repeated database queries in memory. On a logged-in-heavy site, 100 MB of Redis buys more speed than doubling the server.
- Audit the plugin list. Every active plugin loads on every uncached request, in every worker. Removing three unused plugins shrinks every one of your PHP workers at once.
- Add swap as a safety net. 1-2 GB of swap will not make a small server fast, but it turns an out-of-memory crash into a brief slowdown. On a 1 GB server it is not optional.
What this costs in 2026
Once you know you need 2 GB, the real decision is how much management you want on top of the server. These are the list prices vendors published in August 2026:
| Option | What you get | Monthly |
|---|---|---|
| InstaPods Build | 2 vCPU, 2 GB, 25 GB, SSL + backups included, no bandwidth meter | $7 flat |
| Vultr | 1 vCPU, 2 GB, unmanaged | $10 |
| Cloudways | 1 vCPU, 2 GB, 50 GB, managed server | $11 |
| DigitalOcean droplet | 2 GB, unmanaged | $12 |
| DigitalOcean + Ploi panel | 2 GB plus a panel for SSL and deploys | $22 |
| Any VPS + cPanel Solo | Server plus a $29.99 panel licence | $40+ |
The pattern is that the panel often costs more than the RAM. If you want the full breakdown by situation, including when a $99/mo managed WordPress plan is actually worth it, InstaPods keeps an up-to-date guide to the best VPS for WordPress with every price sourced from the vendor. If you are still weighing up whether you need a VPS at all, their VPS vs shared hosting comparison is the question before this one.
For a small site, the InstaPods row is the one I would pick, because the bill does not move. You get a real Linux server with SSH, WordPress and MySQL running together, and no panel licence or renewal price that jumps after year one. The trade-off is honest too: there is no email hosting and no one-click staging, so if you rely on either, look at the managed options instead. Deploying WordPress on InstaPods is one command, and adding a card gives you $10 of credit, which is more than a month of the 2 GB plan.
Managed or self-managed?
RAM sizing is the same either way. The difference is who reads the free -m output when something goes wrong at midnight. On a self-managed VPS that is you. On a managed server the host watches memory and patches the OS, and you still own your plugins and theme. There is a good plain-English breakdown of managed vs self-managed VPS if you are deciding between the two.
If you are comparing full-service WordPress hosts rather than servers, our roundup of the best WordPress hosting services covers the shared and managed end of the market.
The bottom line
Most WordPress sites need 2 GB of RAM, a page cache and a sensible pm.max_children, not a bigger server. Measure your PHP workers, do the one-line sum, and buy the tier the arithmetic tells you to. The money you save on RAM you never needed pays for a tested backup, which is the thing that actually saves a site.
