On a VPS with 1 GB of RAM, the web server you pick decides how much memory is left for PHP and MySQL. Nginx vs Apache vs Caddy is not a contest about raw speed on a big machine. It is a contest about memory per connection, config effort, and how much hand-holding you want for HTTPS. Pick wrong and the server still runs, but a traffic spike eats the RAM, the kernel starts killing processes, and MySQL is usually the first casualty.
This guide compares the three on a small VPS running WordPress, with real config examples for each. No server wins every category. The right one depends on your RAM, your comfort with config files, and whether you need Apache-only features.
Start with the RAM budget, not the benchmark
A 1 GB VPS has to fit the operating system, the web server, PHP-FPM, and MySQL at the same time. MySQL alone can take a few hundred megabytes once its buffers warm up, and PHP-FPM workers each hold tens of megabytes while they run. Whatever the web server keeps per connection comes straight out of that same budget.
That is why connection handling matters more than headline speed here. Framed as a low ram vps web server choice, the question is not which server is fastest in a lab, but how much memory each connection holds back from PHP and MySQL. Nginx uses an event-driven model: a small pool of worker processes handles many connections at once, so memory stays roughly flat as concurrent visitors rise. Apache’s classic prefork model gives each connection its own process, so memory climbs with every simultaneous visitor. Caddy sits closer to nginx, with a small footprint and a single binary that also handles HTTPS for you. If you are still sizing the VPS itself, our guide on how much RAM a WordPress VPS actually needs pairs with this comparison: pick the RAM first, then the server that fits inside it.
Nginx: the low-memory default
Nginx is the usual pick for a low-RAM VPS because it does one job with little memory: serve static files fast and hand PHP requests to PHP-FPM. A typical worker setup looks like this:
worker_processes auto;
worker_connections 1024;
events {
worker_connections 1024;
}
WordPress runs behind it through PHP-FPM, not inside the web server process, so a slow PHP script blocks one FPM worker, not the whole server. The trade is config work: nginx has no .htaccess support, so rewrite rules, redirects, and access restrictions live in the server block and need a reload to apply. Many WordPress plugins that write their own .htaccess rules simply do nothing on nginx until you translate those rules by hand.
Nginx also pairs well with server-side caching, which matters on a small VPS because a cached page costs almost no RAM to serve. For a deeper look at that side of the stack, see our earlier comparison of Apache vs nginx for WordPress hosting, which covers the same trade from the WordPress angle.
Apache: the compatible choice that costs RAM
Apache stays relevant for one reason: compatibility. Shared-hosting habits, .htaccess files, and plugins that expect Apache rules all work without translation. If you move a site from shared hosting and its .htaccess carries redirects, security rules, and caching headers, Apache runs them as-is.
The cost shows up under load. With the prefork MPM, each connection holds its own process, and each process carries the PHP interpreter when you use mod_php. The modern fix is the apache event mpm php-fpm combination, which separates PHP from Apache processes the way nginx does:
<IfModule mpm_event_module>
StartServers 2
MinSpareThreads 25
MaxSpareThreads 75
ThreadLimit 64
ThreadsPerChild 25
MaxRequestWorkers 100
</IfModule>
Even with event MPM, Apache still uses more memory per connection than nginx on the same VPS, and its config files are spread across more places: the main config, virtual hosts, and per-directory .htaccess files that Apache re-reads on every request. On a 2 GB VPS that overhead is easy to ignore. On a 1 GB VPS with MySQL and PHP-FPM beside it, it is the difference between a calm server and one that swaps. If your stack is Apache plus PHP, the LAMP vs LEMP comparison for WordPress hosting walks through the same decision with the full stack in view.
Caddy: the low-effort option with automatic HTTPS
Caddy is the newest of the three and the easiest to run. Its config file, the Caddyfile, reads almost like plain language, and HTTPS certificates are automatic: point a domain at the server, and Caddy fetches and renews the certificate without a certbot cron job or a manual renewal step.
example.com {
root * /var/www/html
php_fastcgi unix//run/php/php8.3-fpm.sock
file_server
}
That short block replaces a much longer nginx server block plus a certificate setup. The caddy automatic https wordpress setup above needs no certbot step at all. Caddy’s memory use sits near nginx for typical WordPress traffic, and its single-binary install means no module hunting. The trade is ecosystem: fewer tutorials, fewer hosting panels built around it, and fewer plugins that assume your server is nginx or Apache. Our head-to-head on Caddy vs nginx, and which one is easier to maintain, covers the day-to-day maintenance side in more detail.
Caddy also handles reverse proxying and static files well, so it doubles as a front door for small apps and APIs on the same VPS. Where it lags is fine-grained control: nginx still offers more knobs for caching rules, rate limiting, and complex location matching, and those knobs matter once a site grows past a simple setup.
Nginx vs Apache vs Caddy side by side
| Aspect | Nginx | Apache | Caddy |
|---|---|---|---|
| Memory per connection | Low, roughly flat as connections rise | Highest, grows with concurrent connections | Low, close to nginx |
| PHP handling | PHP-FPM only | mod_php or PHP-FPM with event MPM | PHP-FPM via php_fastcgi |
| HTTPS setup | Manual, usually certbot | Manual, usually certbot | Automatic, built in |
| .htaccess support | None, rules must be translated | Full, works out of the box | None, Caddyfile directives instead |
| Config style | Server blocks, precise but verbose | Virtual hosts plus per-directory files | Caddyfile, short and readable |
| Caching control | Strong, FastCGI cache built in | mod_cache, less commonly tuned | Basic, often paired with a reverse proxy cache |
| Best fit on low RAM | Default pick for most small VPS setups | Only when .htaccess compatibility is required | Best pick when you want the least maintenance |
Which one for your VPS size
On 512 MB to 1 GB of RAM, nginx is the safe default. Its flat memory curve leaves the most room for MySQL, and FastCGI cache lets it serve most anonymous traffic without PHP at all. Caddy is a close second if you value automatic HTTPS and short config files over deep tuning options.
On 2 GB of RAM, the choice opens up. Apache with event MPM and PHP-FPM runs fine at this size, so pick it when a site depends on .htaccess rules or when you migrate from shared hosting and want zero rule translation. Caddy also fits comfortably here and stays the easiest to maintain.
Above 2 GB, memory stops deciding the question. Pick based on your team’s habits: nginx for teams that already know it and want caching control, Apache for compatibility-heavy migrations, Caddy for new projects where short config and automatic HTTPS save time every week.
Switching without breaking the site
Whichever server you pick, test the switch on a staging copy first. The common breakage points are rewrite rules, redirect chains, and upload limits. Nginx needs WordPress permalinks translated into a try_files directive:
location / {
try_files $uri $uri/ /index.php?$args;
}
Moving to Apache means checking that .htaccess files are actually being read and that AllowOverride is on for the site directory. Moving to Caddy means checking that the php_fastcgi socket path matches your PHP version, since a wrong socket path gives a blank page with little explanation in the browser.
After the switch, watch memory for a full day, not ten minutes. Check free -m during a traffic peak, confirm MySQL is not being killed, and confirm cached pages still serve. A server that looks fine at midnight can still fall over at noon when real visitors arrive.
For most low-RAM WordPress sites, nginx wins on memory and caching control, Caddy wins on maintenance effort, and Apache wins only when compatibility forces the choice. Match the server to the constraint that actually bites on your VPS, and the rest of the stack gets easier.