WordPress Server Performance: PHP, OPcache, Workers, Database, and Hosting Limits

WordPress speed does not end with a cache plugin. When a request reaches PHP, the server still needs enough CPU, memory, PHP capacity, database performance, and storage speed to finish the work. If those resources are exhausted, requests queue and Time to First Byte rises.

The useful question is not “Which host is fastest?” It is “Which server resource is limiting this site under its real workload?”

Start with the request types that cannot hide behind page cache

Full-page cache can make public articles extremely fast because WordPress does little or no PHP work for a cache hit. That does not prove the server is healthy for logged-in users, checkout, search, REST requests, wp-admin, cron, or cache misses.

Test at least one cacheable public page and one dynamic request that matters to the site. If the public page is fast but admin and dynamic actions are slow, look deeper than the CDN or page cache.

PHP version matters

WordPress runs mainly on PHP, and supported modern PHP versions include performance and security improvements. WordPress.org publishes current server requirements, but your plugins and theme also need to support the PHP version you choose.

Do not jump to a new PHP branch on production without testing. Use staging, run the site’s main workflows, and check error logs. The best version is one that is current, supported by WordPress and your stack, and stable on your host.

Keeping WordPress itself current matters too. As of October 7, 2026, the current WordPress release is 7.1.3, a maintenance and security release published October 6.

OPcache avoids recompiling PHP on every request

PHP code must be compiled into bytecode before it executes. OPcache keeps compiled bytecode in memory so PHP can reuse it across requests instead of repeating that compilation work.

Most serious WordPress hosting should have OPcache enabled. If you manage your own VPS, check that it is active and sized for the amount of PHP code on the server. A tiny OPcache that constantly evicts scripts loses much of the benefit.

Do not copy OPcache settings from a large server to a small shared machine. Memory settings must fit the system and the number of PHP applications it runs.

PHP workers control concurrency

A PHP worker can process a PHP request. If all workers are busy, new dynamic requests wait in a queue. This can happen during traffic bursts, slow cron jobs, imports, checkout activity, or remote API delays.

Adding workers can help when CPU and memory are available. Adding too many can make the server worse because each worker needs memory and they can all compete for CPU and database access.

Look at queue time, worker saturation, CPU, memory, and request duration together. A slow plugin that holds a worker for five seconds should be fixed before simply multiplying workers.

CPU limits can make PHP slow

Shared and managed hosting plans often have CPU or execution limits. On a VPS, the virtual machine also has a fixed amount of compute. If PHP, image processing, backups, bots, database work, and cron all compete for the same CPU, requests can slow down.

Check host metrics during the slow period, not hours later. A daily backup can cause a short spike that disappears from an average chart.

Memory needs headroom

WordPress has a PHP memory limit, while the server has physical or virtual memory. Raising the WordPress memory limit does not create RAM. If several PHP workers are allowed to use large amounts of memory, the server can exhaust RAM or start swapping.

Swapping to disk can make a site dramatically slower. Fix plugins that consume abnormal memory, reduce worker count if the machine cannot support it, or add memory when the workload truly requires more.

The database can be the bottleneck

WordPress relies on MySQL or MariaDB for content, settings, metadata, users, and plugin data. Slow queries, missing indexes in custom tables, large autoloaded options, storage latency, and insufficient database memory can all affect PHP request time.

Use query profiling before changing server variables. The database cleanup guide explains why removing rows is not the same as fixing slow queries.

If autoloaded settings are large, use the autoloaded options audit rather than random database tuning.

Persistent object cache can reduce repeat work

WordPress has an object cache for a single request by default. A persistent backend such as Redis can keep supported cached data between requests. This may reduce repeated database work on busy or dynamic sites.

It is not a replacement for page caching and it does not fix every slow query. Read when Redis helps WordPress before enabling it just because the host offers a toggle.

Storage latency matters for some workloads

WordPress reads PHP files, cache files, uploads, logs, and sometimes sessions from storage. The database also depends on storage. Slow disk I/O can become visible during backups, image generation, plugin updates, cache rebuilds, and large database operations.

Do not focus only on advertised SSD or NVMe labels. Shared storage can still be busy. Use host metrics or operating-system tools to see whether I/O wait rises during the slowdown.

Web server and FastCGI settings matter

Nginx, Apache, LiteSpeed, and other web servers can all run WordPress well when configured properly. The surrounding stack controls compression, static-file delivery, connection handling, PHP routing, cache headers, and sometimes full-page caching.

A web server switch is not a first troubleshooting step. If the current stack serves static files quickly and the delay is inside PHP, changing the brand of web server may not solve the cause.

Page cache is still the biggest win for many public sites

WordPress’s own performance guidance points to caching as a major optimization. For public pages that are the same for many visitors, serving finished HTML avoids repeating PHP and database work.

Use page caching safely and exclude dynamic areas such as carts, accounts, previews, and other personalized pages. Cache success can reduce server load as well as visitor wait time.

Remote services can tie up server capacity

A PHP request that waits for an outside API still occupies resources. License servers, search services, feeds, payment APIs, and integrations can all add delay.

Profile outbound HTTP calls. Cache safe responses and move noncritical work to background jobs where appropriate. If a remote call must happen during checkout, use sensible timeouts and error handling.

Cron and background jobs share the same machine

Backups, scans, email queues, feed imports, and scheduled cleanup can use the same CPU, PHP, database, and disk as visitors. A server that feels random may actually have a predictable job running every hour.

Check WP-Cron and scheduled work before paying for a larger plan. Sometimes moving a heavy job or fixing a duplicate schedule solves the spike.

When moving hosts is justified

A host change makes sense when the site is already reasonably optimized but the platform still cannot provide enough PHP capacity, CPU, memory, database performance, cache control, current software, or useful diagnostics.

Collect evidence first. Record TTFB, worker saturation, CPU, memory, slow queries, and error logs. That makes it easier to choose a plan based on the actual limit instead of marketing claims.

A practical server audit

  1. Measure cached and uncached request types.
  2. Confirm current supported WordPress and PHP versions.
  3. Check that OPcache is enabled.
  4. Watch PHP worker saturation and queueing.
  5. Check CPU, memory, swap, and disk I/O during slow periods.
  6. Profile database queries and autoloaded options.
  7. Review Redis only if repeat object work is a bottleneck.
  8. Check cron and remote HTTP calls.
  9. Upgrade or move hosting only when a platform limit remains.

Retest with the TTFB workflow after each server-side change. The aim is stable response under normal traffic, not one unusually fast benchmark run.

Test under a realistic burst

One uncached request can look healthy while ten simultaneous dynamic requests create a queue. If the site has store launches, newsletters, or predictable traffic bursts, use a controlled load test on staging or with the host’s help. Watch response time and resource saturation together. Do not run an aggressive load test against production without permission and safeguards.

Keep the test modest enough to protect the server and use production-like data so the result reflects real queries and cache behavior.

Sources and further reading

Related FastWP guides