When people say “a PHP server”, they usually mean a web server + a PHP runtime. In practice, you’re choosing an architecture:

  • How requests are terminated (TLS, HTTP/2/3, headers).
  • How static assets are served (images, CSS/JS, caching).
  • How PHP executes (process model, workers, memory).
  • How you cache (page cache, reverse proxy cache, object cache).
  • How you operate and secure it (patching, logs, rate limits).

This guide compares the most common and modern stacks you’ll encounter in 2026:

  • Nginx + PHP-FPM (the classic “fast and boring” production setup)
  • LiteSpeed/OpenLiteSpeed + LSAPI (popular for WordPress speed and caching)
  • Caddy + PHP-FPM (simple config, automatic HTTPS)
  • FrankenPHP (a newer approach: PHP embedded in Caddy, optional “worker mode”)
  • Plus “etc”: Apache, RoadRunner, Swoole, Nginx Unit—where they fit

1) The mental model: PHP doesn’t always “run in the web server”

PHP can run through different SAPIs (Server APIs). The big ones you’ll care about:

  • PHP-FPM: a separate service that executes PHP via FastCGI (most common with Nginx/Caddy).
  • LSAPI: LiteSpeed’s interface, similar intent to FPM but optimized for LiteSpeed.
  • Embedded / application server: PHP lives inside the server process (FrankenPHP), or you run a long-lived PHP worker model (RoadRunner, Swoole).
  • mod_php (Apache): PHP runs in Apache worker processes (less common for modern high-traffic setups, but still exists).

Most production problems come from misunderstanding the process model:

  • “How many concurrent requests can I serve?”
  • “What happens when PHP memory spikes?”
  • “Where do I cache?”
  • “Who is responsible for TLS/HTTP features?”

2) Nginx + PHP-FPM: the default for a reason

How it works

  • Nginx terminates HTTP/TLS and serves static files.
  • Dynamic requests (.php) are forwarded to PHP-FPM over FastCGI (unix socket or TCP).
  • FPM runs a pool of PHP worker processes; each request executes and then releases the worker back to the pool.

Why teams choose it

  • Predictable, mature, and easy to operate.
  • Excellent static file serving and reverse-proxy features.
  • Works for WordPress, Laravel, Symfony, and most PHP apps.

Minimal Nginx config (conceptual)

server {
  listen 443 ssl http2;
  server_name example.com;
  root /var/www/app/public;

  location / {
    try_files $uri $uri/ /index.php?$query_string;
  }

  location ~ \.php$ {
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_pass unix:/run/php/php-fpm.sock;
  }
}

FPM tuning that actually matters

Your FPM pool settings control concurrency and memory behavior:

  • pm (dynamic/ondemand/static)
  • pm.max_children (max concurrent PHP requests)
  • pm.max_requests (recycle workers to avoid memory leaks)
  • request_terminate_timeout (kill stuck requests)

Rule of thumb:

  • Calculate pm.max_children as: (available_ram_for_php / average_worker_memory).
  • Use pm.max_requests to keep memory stable over time, especially with WordPress + many plugins.

Performance baseline checklist

  • Enable OPcache (opcache.enable=1) and size it properly.
  • Use realpath cache tuning if your app has many files.
  • Enable gzip/brotli at the web server/CDN layer (prefer CDN if possible).
  • Add a page cache layer (FastCGI cache, or app-level caching) if you’re serving mostly cacheable pages.

Best for

  • “Normal” production sites: blogs, marketing sites, APIs, and mixed workloads.
  • Teams that value reliability and debuggability over “novel performance”.

3) LiteSpeed/OpenLiteSpeed + LSAPI: WordPress speed as a product

LiteSpeed’s popularity is heavily driven by WordPress performance and its cache ecosystem.

How it works

  • LiteSpeed is a web server that can serve static files and proxy, similar to Nginx/Apache.
  • It runs PHP using LSAPI (LiteSpeed API), typically via lsphp binaries.

Why teams choose it

  • Strong performance out-of-the-box for WordPress sites.
  • LSCache (and related plugins) can deliver excellent Core Web Vitals when configured well.
  • Compatibility perks: many hosts use it as an Apache drop-in replacement (supports .htaccess behavior).

Trade-offs

  • More “platform-like” and host-dependent: you may be constrained by hosting control panels.
  • Debugging can feel different if your team is Nginx-first.
  • Some advanced setups still end up using a CDN + edge caching, reducing the advantage of server-specific caching.

Best for

  • WordPress sites where editorial velocity is high and you want fast results with minimal custom infra.
  • Teams comfortable with host-provided performance tooling.

4) Caddy + PHP-FPM: the “simplify everything” option

Caddy is a modern web server known for simple config and automatic HTTPS.

How it works

  • Caddy terminates TLS and serves static files.
  • PHP runs via php_fastcgi to PHP-FPM (still the same FPM model as Nginx).

Minimal Caddyfile for PHP-FPM

example.com {
  root * /var/www/app/public
  php_fastcgi unix//run/php/php-fpm.sock
  file_server
}

Why teams choose it

  • Very low configuration overhead.
  • Automatic TLS and good defaults.
  • Great for small teams who want production-grade behavior without “Nginx config culture”.

Trade-offs

  • If you rely on extremely granular Nginx tuning patterns, you’ll need to learn Caddy’s equivalents.
  • Some hosting environments and enterprise networks still assume Nginx/Apache conventions.

Best for

  • Teams that want fast setup and a clean config story.
  • Smaller apps where simplicity reduces operational risk.

5) FrankenPHP: PHP embedded in Caddy (and the “worker mode” idea)

FrankenPHP is a newer approach: instead of running PHP in a separate FPM service, it embeds PHP into a server runtime (built on Caddy). The headline benefits are:

  • Fewer moving parts: one server process instead of “Nginx + FPM”.
  • Modern protocol support via Caddy (TLS automation, HTTP/2/3).
  • Optional “worker mode” for frameworks that benefit from warm state (fewer cold starts per request).

How it works (conceptually)

  • The server handles HTTP/TLS and executes PHP directly.
  • In “worker mode”, your app can keep a warm runtime between requests (similar to long-lived workers), which can reduce bootstrap overhead for large frameworks.

Why teams consider it

  • You want a modern deployment model (containers, single process) and better performance without introducing a separate worker runtime (like RoadRunner).
  • You want “app server” ergonomics but still keep the PHP ecosystem.

Trade-offs / risks to evaluate

  • It’s newer: ensure your team is comfortable operating it (observability, upgrades, fallbacks).
  • Some WordPress/plugin expectations are “FPM-shaped” (though many setups still work fine).
  • Worker mode changes assumptions (statefulness must be managed carefully).

Best for

  • Laravel/Symfony apps where bootstrap overhead is meaningful.
  • Teams that like Caddy and want a simpler runtime than “Nginx + FPM”.
  • Projects where you can invest in validation and monitoring early.

6) “Etc”: other PHP runtimes you’ll see

Apache (still relevant, but usually not the performance-first pick)

Apache with PHP can be very productive, especially in shared hosting and legacy environments. Modern production teams often choose Nginx/Caddy for static performance and clearer separation of concerns.

RoadRunner

RoadRunner runs PHP apps as long-lived workers (Go-based server). Great for high throughput and low latency, but it changes runtime assumptions (statefulness, memory management, lifecycle hooks).

Swoole / OpenSwoole

Event-driven PHP runtime with coroutines and long-lived workers. Powerful, but requires discipline around state and compatibility.

Nginx Unit

An application server that can run PHP apps with dynamic config. Interesting for certain ops-heavy environments, but less common than FPM/Caddy/FrankenPHP in typical web stacks.

7) Choosing the right stack (by use case)

WordPress (content-heavy sites)

Practical picks:

  • LiteSpeed + LSCache (if you want “WordPress performance as a package”)
  • Nginx + FPM + CDN (if you want maximum control and predictable operations)

Key success factors:

  • Page caching strategy (server cache, plugin cache, CDN cache)
  • Image optimization (CDN or WP pipeline)
  • Plugin discipline (performance and security)

Laravel/Symfony (app-heavy sites)

Practical picks:

  • Nginx + FPM (safe default)
  • Caddy + FPM (simpler config)
  • FrankenPHP (if you want a modern app-server feel; validate carefully)

Key success factors:

  • OPcache configured well
  • Database and queue tuning
  • Caching and revalidation strategy

“Just ship” small sites

Practical picks:

  • Caddy + FPM for a clean, low-maintenance config
  • Managed WordPress host if you don’t want to own operations

8) Security basics that apply to every option

No matter which server you pick, most PHP compromises come from the same root causes:

  • Outdated plugins/dependencies
  • File upload execution paths
  • Weak admin/auth controls
  • Excessive permissions on the filesystem

Non-negotiables:

  • Disable executing PHP in upload directories (WordPress wp-content/uploads).
  • Use least-privilege file permissions; avoid writable code directories in production.
  • Add rate limiting/WAF rules for admin endpoints, XML-RPC (if enabled), and login routes.
  • Keep OS packages + PHP + extensions updated.
  • Use security headers (CSP, X-Content-Type-Options, Referrer-Policy) appropriate to your app.

9) Caching strategy: server choice won’t save you without it

Most “PHP is slow” complaints are really “we didn’t cache”.

Layers to consider:

  1. CDN cache (static assets, sometimes HTML for public pages)
  2. Reverse-proxy/page cache (cache HTML responses for anonymous users)
  3. Object cache (Redis/Memcached for WP transients, app caches)
  4. Opcode cache (OPcache, almost always required)

For content sites, caching HTML for anonymous users usually delivers the biggest ROI.

10) A pragmatic recommendation (if you just want the answer)

If you want the most “boring and correct” baseline:

  • Nginx + PHP-FPM (or Caddy + PHP-FPM if you prefer simpler config)
  • Add a CDN for assets and consider HTML caching where appropriate
  • Tune FPM based on memory, enable OPcache, and set clear timeouts

If you run WordPress and you want a strong “packaged performance” route:

  • LiteSpeed/OpenLiteSpeed + LSCache, still backed by a CDN for global delivery

If you’re building a modern PHP app and you’re willing to adopt newer tech for ergonomic ops:

  • FrankenPHP is worth evaluating—especially if you already like Caddy and care about performance and simplicity.

The server is only one part of the story. The real production wins come from:

  • Clear process model (concurrency and memory)
  • Caching layered correctly
  • Tight security posture
  • Observability (logs + metrics) and disciplined upgrades