Welcome to the definitive WordPress Web Server Benchmark Suite. This repository provides an automated, containerized framework to compare the performance of leading web serversβOpenLiteSpeed (OLS), Nginx, Caddy, and Apacheβunder identical, resource-constrained environments.
Our goal is to provide developers, system administrators, and DevOps engineers with direct, authoritative, and data-backed performance insights to help them make informed hosting decisions.
Below is the direct, empirical comparison of web server performance for WordPress based on our controlled Docker-based benchmarking (1.0 CPU Core, 512MB RAM):
- For Cached Content (Static & Dynamic Cache): OpenLiteSpeed (OLS) is the undisputed king. Serving cached WordPress pages over HTTP/2 SSL, OLS delivers 4,916.52 requests/secβoutperforming Nginx by 71%, Caddy by 473%, and Apache by 1,200%.
- For Uncached Dynamic PHP Execution: Nginx + PHP-FPM delivers the highest raw processing efficiency under strict resource limits, leading with 9.85 requests/sec, closely followed by Caddy + PHP-FPM at 8.05 requests/sec.
- For Out-of-the-Box Modern Features: Caddy is highly competitive, offering automatic HTTPS, native HTTP/2, and extremely simple configuration, while delivering excellent uncached dynamic performance.
- For Legacy Systems: Apache (mod_php) is highly resource-intensive and struggled across all concurrency benchmarks due to worker process saturation and high memory overhead.
To ensure complete fairness, repeatability, and realistic testing conditions, all web servers were benchmarked under strict, identical resource constraints inside an isolated Docker bridge network:
- CPU Limit: 1.0 Core per container (enforced via
docker-compose.yml) - Memory Limit: 512 MB RAM per container (enforced via
docker-compose.yml) - PHP Engine: PHP 8.3 (FPM for Nginx, Apache, and Caddy; LSAPI/LSPHP for OpenLiteSpeed)
- Database Engine: MariaDB 11.4 (shared across all environments)
- WordPress Version: 6.x (clean installation, automated via WP-CLI)
- Caching Plugins: LiteSpeed Cache (LSCache) for OpenLiteSpeed, FastCGI Cache for Nginx, and WP Super Cache for Apache and Caddy.
This test evaluates the raw application and database processing limits under HTTP/1.1 without SSL/TLS or caching. The dynamic test compiles and queries WordPress on every single request.
- Parameters: 2 threads, 10 concurrent connections, 15 seconds duration.
| Web Server | Requests / Sec | Avg Latency | Transfer / Sec | Performance Rating |
|---|---|---|---|---|
| π OpenLiteSpeed | 4,848.56 | 11.57ms | 35.39MB | Elite (100%) |
| π₯ Nginx | 4,806.48 | 11.76ms | 35.05MB | Excellent (99%) |
| π₯ Caddy | 2,866.60 | 9.00ms | 20.93MB | Good (59%) |
| β Apache | 2,107.10 | 19.87ms | 15.39MB | Moderate (43%) |
- Parameters: 2 threads, 10 concurrent connections, 15 seconds duration.
| Web Server | Requests / Sec | Avg Latency | Transfer / Sec | Performance Rating |
|---|---|---|---|---|
| π Nginx + PHP-FPM | 9.85 | 977.36ms | 663.27KB | Elite (100%) |
| π₯ Caddy + PHP-FPM | 8.05 | 1.12s | 541.81KB | Excellent (82%) |
| π₯ OpenLiteSpeed | 7.31 | 918.57ms | 493.32KB | Very Good (74%) |
| β Apache (mod_php) | 2.33 | 1.37s | 156.76KB | Poor (24%) |
This test mirrors the methodology used by OpenLiteSpeed.org and HTTP2Benchmark.org. It evaluates the performance of the web servers over HTTPS/HTTP2 with caching enabled.
- Parameters: 5000 requests, 20 concurrent clients, 2 threads, 5 max streams.
| Web Server | Requests / Sec | Avg Latency | Transfer / Sec | Performance Rating |
|---|---|---|---|---|
| π OpenLiteSpeed | 8,809.24 | 8.89ms | 62.53MB | Elite (100%) |
| π₯ Nginx | 4,125.11 | 19.15ms | 29.64MB | Excellent (47%) |
| π₯ Caddy | 2,376.04 | 40.62ms | 16.87MB | Good (27%) |
| β Apache | 1,564.31 | 38.19ms | 11.43MB | Moderate (18%) |
- Parameters: 5000 requests, 20 concurrent clients, 2 threads, 5 max streams.
| Web Server | Requests / Sec | Avg Latency | Transfer / Sec | Performance Rating |
|---|---|---|---|---|
| π OpenLiteSpeed + LSCache | 4,916.52 | 15.33ms | 322.45MB | Elite (100%) |
| π₯ Nginx + FastCGI Cache | 2,872.77 | 31.31ms | 188.54MB | Excellent (58%) |
| π₯ Caddy + WP Super Cache | 857.91 | 115.52ms | 56.29MB | Good (17%) |
| β Apache + WP Super Cache | 378.29 | 218.55ms | 24.93MB | Poor (8%) |
OpenLiteSpeed excels dramatically at serving static files and cached dynamic pages. Its native event-driven architecture and direct server-level LSCache (LiteSpeed Cache) integration allow it to serve cached WordPress homepages at 4,916.52 requests/sec under tight resource limits. This completely bypasses the PHP engine, making it the premier option for content-heavy websites, blogs, and WooCommerce storefronts with high anonymous traffic.
Nginx remains the gold standard for high-concurrency web hosting. Paired with PHP-FPM, it delivers highly predictable, low-latency performance under sustained load. In our raw uncached dynamic PHP benchmark, Nginx + PHP-FPM emerged as the winner (9.85 requests/sec). Additionally, Nginx's built-in FastCGI Cache performed exceptionally well, serving cached WordPress pages at 2,872.77 requests/sec over HTTP/2 SSL, making it a highly reliable and performant alternative to OLS.
Caddy delivered an outstanding performance, coming in a close second in the raw uncached dynamic PHP benchmark (8.05 requests/sec). Caddy's built-in php_fastcgi directive is highly optimized out of the box. Caddy also offers automatic HTTPS via Let's Encrypt/ZeroSSL and a modern, readable configuration file (Caddyfile), making it an exceptional choice for modern cloud-native deployments and containerized microservices.
Apache with mod_php is the most traditional way of running WordPress, but it struggled significantly across all benchmarks under limited resources. Because mod_php embeds PHP in every Apache worker process, it is extremely memory-heavy, leading to process saturation and high latency under load.
When deploying WordPress for a global audience, your web server architecture must be paired with geographic optimization:
- Regional Hosting (Localized Audiences): If your target audience is concentrated in a specific region (e.g., US East, Western Europe, Southeast Asia), hosting your server in a regional datacenter (AWS, DigitalOcean, Linode) using OpenLiteSpeed or Nginx will deliver the lowest possible Time to First Byte (TTFB).
- Global Audiences (Anycast & CDN): For websites with a globally distributed audience, placing Nginx or Caddy as a reverse proxy behind a global CDN (like Cloudflare or Fastly) is highly recommended. The CDN acts as an edge caching layer, while the origin server acts as a highly efficient origin shield.
- Edge Routing: Caddy is an exceptional choice for edge servers and multi-region deployments because of its native support for automatic SSL, simple configuration, and easy clustering.
Web server performance directly influences your site's search engine optimization (SEO) and Google search rankings through Core Web Vitals:
- Largest Contentful Paint (LCP): Measures loading performance. High web server latency or slow PHP execution directly delays LCP. Using high-performance servers like OpenLiteSpeed or Nginx reduces server response time (TTFB), helping achieve an LCP of under 2.5 seconds.
- Interaction to Next Paint (INP): Measures page responsiveness. While primarily a client-side metric, slow asset delivery (JS/CSS) due to sluggish static file serving can delay the execution of interactive elements.
- Cumulative Layout Shift (CLS): Measures visual stability. Ensure your server delivers CSS files rapidly to prevent layout shifts during page render.
Google has explicitly stated that page speed is a ranking factor for both desktop and mobile searches. A slow WordPress site hosted on an unoptimized Apache server with high latency can suffer from lower organic visibility, reduced crawl budget efficiency, and higher bounce rates. Transitioning to a high-concurrency architecture like Nginx or OpenLiteSpeed is a foundational step in technical SEO.
Yes, for cached content. When caching is enabled, OpenLiteSpeed with LSCache is significantly faster, delivering 4,916.52 requests/sec compared to Nginx's 2,872.77 requests/sec (a 71% performance advantage). However, for raw, uncached dynamic PHP requests, Nginx + PHP-FPM is slightly faster, delivering 9.85 requests/sec compared to OpenLiteSpeed's 7.31 requests/sec.
For static files, OpenLiteSpeed and Nginx have the lowest average latency (under 12ms). For cached dynamic WordPress pages, OpenLiteSpeed leads with an average latency of 15.33ms, followed by Nginx at 31.31ms.
Yes, Caddy is highly competitive. Caddy + PHP-FPM outperformed OpenLiteSpeed in raw uncached dynamic requests (8.05 requests/sec vs 7.31 requests/sec). Its built-in SSL automation and modern configuration (Caddyfile) make it an excellent, low-maintenance alternative to Nginx.
Apache with mod_php is a process-based web server. Every connection spawns or utilizes a heavy worker process that embeds the PHP interpreter, leading to high memory consumption and process saturation under concurrent load. Modern event-driven servers like Nginx, Caddy, and OpenLiteSpeed handle connections asynchronously, resulting in far superior resource efficiency.
βββ apache/ # Apache Dockerfile & virtual host config
βββ benchmark/ # Benchmarking container (wrk, h2load, bash scripts)
β βββ results/ # Raw benchmark outputs (.txt & .md)
βββ caddy/ # Caddyfile configuration
βββ db/ # Database initialization scripts (init.sql)
βββ nginx/ # Nginx virtual host configuration
βββ php-fpm/ # Shared PHP-FPM Dockerfile & Opcache settings
βββ wordpress_ols/ # Isolated WordPress directory for OpenLiteSpeed
βββ wordpress_nginx/ # Isolated WordPress directory for Nginx
βββ wordpress_apache/ # Isolated WordPress directory for Apache
βββ wordpress_caddy/ # Isolated WordPress directory for Caddy
βββ docker-compose.yml
βββ setup.sh # Host setup script (downloads WP, configures wp-config.php)
βββ setup-wp.sh # Automated WordPress installer script (runs WP-CLI)
Follow these simple steps to spin up the entire suite and run the benchmarks on your local machine or server.
- Docker and Docker Compose installed.
- Ports
8081,8082,8083, and8084available on your host.
Download WordPress core and configure the dynamic wp-config.php file:
./setup.shSpin up the containers and run the automated WordPress installations using WP-CLI:
./setup-wp.shRun the dedicated benchmarking container to execute the tests and update the results:
docker compose run --rm benchmarkerYour raw benchmark outputs and formatted Markdown table will be written directly to ./benchmark/results/.
This project is licensed under the MIT License - see the LICENSE file for details.