WordPress performance monitoring: finding slow plugins, queries, caches and checkouts in production
How to measure TTFB and page load on a live WordPress site, trace slow plugins and MySQL queries, watch PHP-FPM, object cache and page cache, keep WooCommerce checkouts fast and instrument it all with OpenTelemetry.
Summary
- WordPress performance monitoring in production starts with server response time (TTFB) per page type and then follows the request into plugins, MySQL queries, PHP-FPM workers, the object cache and the page cache.
- The most common hidden costs are autoloaded options bloat, uncached admin-ajax and REST requests, wp-cron jobs running on visitor requests, external HTTP calls from plugins and uncached WooCommerce cart and checkout pages.
- The OpenTelemetry PHP extension with the open-telemetry/opentelemetry-auto-wordpress and mysqli instrumentation packages produces traces without changing plugin code, and real user monitoring adds the Core Web Vitals your visitors actually experience.
WordPress performance monitoring in production answers a question that lab tests cannot: why is this page slow for real visitors right now? A Lighthouse run on your laptop shows a cached homepage. Your customers meet a logged-in account page, a WooCommerce checkout, a search result or an admin screen that runs thirty plugins, two hundred database queries and three calls to external APIs before the first byte leaves the server.
This guide follows a WordPress request from the browser to the database and back. It covers TTFB and page load, slow plugins and themes, MySQL and autoloaded options, PHP-FPM, object and page caches, wp-cron, external HTTP calls, WooCommerce, admin-ajax and the REST API, Core Web Vitals, OpenTelemetry instrumentation, alert thresholds and a checklist you can copy.
Measure TTFB and page load per page type
Time to first byte is the cleanest server-side signal on a WordPress site, because it contains everything PHP, MySQL and your caches did before the response started. Measure it per page type, not as one site-wide average:
- Cached anonymous pages (homepage, blog posts, category pages) should be served by a page cache and stay fast regardless of plugin count.
- Uncached dynamic pages (search, logged-in pages, cart, checkout, my-account) run the full WordPress stack on every request. This is where regressions show first.
- Background endpoints:
/wp-admin/admin-ajax.php,/wp-json/,?wc-ajax=andwp-cron.php. Track them as separate groups.
Collect request duration from the web server (Nginx $request_time and $upstream_response_time, or Apache %D) and label each request with its page type. Use p95 and p99 rather than averages. WordPress itself uses a 600 ms default threshold in the Site Health page cache check, which is a reasonable first reference for uncached server response time. Add external checks from the uptime monitoring guide so you also notice when the site is down, not only slow.
Finding slow plugins and themes
"Which plugin is slowing us down?" is the most common WordPress performance question, and disabling plugins one by one on production is the worst way to answer it. Better options, from quick to thorough:
- Query Monitor on staging. The Query Monitor plugin shows queries, hooks, HTTP calls and PHP errors per request, grouped by the plugin or theme that caused them. It is ideal for a single page on staging, but it is a debugging tool, not a production monitor.
- Traces in production. With OpenTelemetry instrumentation (see below), each slow request becomes a trace with spans for database queries and outgoing HTTP calls. Code paths show you which plugin directory the time is spent in.
- Continuous profiling. When traces show "time spent in PHP" without a clear query or call, a sampling profiler shows which functions burn CPU across all requests.
Typical findings are plugins that run heavy work on init for every request, page builders that render large layouts uncached, related-posts and statistics plugins that write to the database on page views, and themes that query far more posts than they display. Mark plugin and theme updates as deploy events so you can compare before and after.
MySQL: slow queries and autoloaded options bloat
WordPress talks to MySQL or MariaDB through $wpdb, which uses the mysqli extension. Watch three things:
- Queries per request and time per request. A product archive jumping from 60 to 600 queries usually points to an N+1 pattern in a theme loop or a plugin that loads post meta one item at a time.
- Slow statements on the server. Enable the MySQL slow query log and correlate it with application spans. Our post on slow queries in MySQL and PostgreSQL covers the server side in detail. Unindexed
meta_querylookups onwp_postmetaare a classic. - Autoloaded options. Options marked for autoload are loaded on every single request. Deactivated plugins often leave large autoloaded entries behind.
Since WordPress 6.6, options larger than 150 KB are no longer autoloaded by default unless code explicitly requests it, and Site Health warns when autoloaded options exceed 800 KB in total. New rows use the autoload values on, off, auto, auto-on and auto-off, while older rows may still say yes. A quick check:
-- size of autoloaded options (WordPress 6.6+ values plus legacy 'yes')
SELECT SUM(LENGTH(option_value)) AS autoload_bytes, COUNT(*) AS rows_total
FROM wp_options
WHERE autoload IN ('yes', 'on', 'auto-on', 'auto');
-- largest autoloaded entries
SELECT option_name, LENGTH(option_value) AS bytes
FROM wp_options
WHERE autoload IN ('yes', 'on', 'auto-on', 'auto')
ORDER BY bytes DESC LIMIT 20;
Track the total as a daily metric. A steady climb is an early warning long before visitors notice.
PHP-FPM workers, object cache and page cache
PHP-FPM saturation
Every uncached WordPress request occupies one PHP-FPM worker until it finishes. When all workers are busy, requests queue and Nginx eventually returns 502 or 504. Enable pm.status_path and collect active processes, max children reached and the listen queue. Our PHP monitoring guide explains the pool metrics, the slow log and OPcache in depth. On WordPress, saturation is often caused by a burst of uncached requests: bots crawling search pages, a cache purge, or many simultaneous checkouts.
Object cache
A persistent object cache (Redis or Memcached through an object-cache.php drop-in) keeps the results of wp_cache_* calls between requests. Site Health has checked for a persistent object cache since WordPress 6.1. Monitor the cache server (memory, evictions, connected clients, latency) with the Redis integration and the hit ratio reported by your drop-in. A falling hit ratio or rising evictions mean MySQL suddenly carries load it did not carry yesterday.
Page cache
Full-page caches (a caching plugin, Nginx FastCGI cache, Varnish or a CDN) are what keep anonymous traffic cheap. Log the cache status header your layer sets and compute a hit rate per page type. Cache purges after publishing, plugin updates or bulk imports show up as short dips in hit rate followed by spikes in TTFB and PHP-FPM usage.
wp-cron, external HTTP calls, admin-ajax and the REST API
wp-cron. By default WordPress runs scheduled events during regular page requests. On low-traffic sites, jobs run late; on busy sites, many requests trigger wp-cron.php. A common setup is define('DISABLE_WP_CRON', true); in wp-config.php plus a system cron that runs wp cron event run --due-now via WP-CLI every minute. Monitor that job for missed runs and duration, and watch the number of overdue events.
External HTTP calls. Plugins call licence servers, marketing tools, shipping APIs and font services through the WordPress HTTP API (wp_remote_get() and friends, default timeout 5 seconds). One slow third party in the request path blocks a PHP-FPM worker for up to that timeout. Track latency and errors per destination host and move non-critical calls into background jobs.
admin-ajax and REST. admin-ajax.php handles the Heartbeat API, form plugins and many frontend features, and it is usually not cached. Group it by the action parameter, and group REST requests by route (/wp-json/wc/store/v1/cart, /wp-json/wp/v2/posts), so one noisy action does not hide behind a single URL.
WooCommerce: cart, checkout and background jobs
For a shop, cart and checkout latency directly affect revenue, and they can never be served from a page cache. Monitor them as your most critical endpoints:
- Checkout and cart latency and error rate, including payment gateway calls as separate spans. A payment provider timing out looks like a slow shop to your customers.
- Cart fragments. Since WooCommerce 7.8 the cart fragments script is only enqueued when the Cart widget is rendered, but themes and plugins can still load it. If
?wc-ajax=get_refreshed_fragmentsappears on every page view, it adds an uncached request per visitor. - Action Scheduler. WooCommerce runs background work (emails, webhooks, subscription renewals) through Action Scheduler. Watch pending and failed actions and how long due actions wait.
- Order storage. High-Performance Order Storage (HPOS) moves orders out of
wp_postsandwp_postmetainto dedicated tables. Compare order-related query times before and after migrating.
Treat checkout as a user journey with a service level objective, as described in SLOs in practice, and add a synthetic check that walks through cart and checkout on a test product.
Core Web Vitals for WordPress
Server metrics stop at the first byte. What visitors feel is measured by Core Web Vitals: LCP, INP and CLS. On WordPress, typical causes are large hero images without proper sizing, render-blocking CSS and JavaScript from plugins, sliders and cookie banners that shift layout, and heavy third-party tags that block the main thread. Collect them from real visitors with real user monitoring and segment by template and device. Our post on Core Web Vitals and RUM shows how to set that up. A poor LCP with a good TTFB points to the frontend; a poor LCP with a poor TTFB points back to the server.
Instrumenting WordPress with OpenTelemetry
The OpenTelemetry PHP project provides zero-code instrumentation for WordPress. You need the opentelemetry PHP extension, the SDK, an exporter and the instrumentation packages. The WordPress package open-telemetry/opentelemetry-auto-wordpress requires PHP 8.1 or higher; open-telemetry/opentelemetry-auto-mysqli adds spans for the mysqli calls that $wpdb makes.
# in the directory that holds your Composer vendor folder (example)
pecl install opentelemetry
composer require open-telemetry/sdk open-telemetry/exporter-otlp \
open-telemetry/opentelemetry-auto-wordpress \
open-telemetry/opentelemetry-auto-mysqli
# php.ini or FPM pool: load Composer's autoloader before WordPress
auto_prepend_file=/var/www/vendor/autoload.php
# environment for PHP-FPM workers (example)
OTEL_PHP_AUTOLOAD_ENABLED=true
OTEL_SERVICE_NAME=shop-wordpress
OTEL_TRACES_EXPORTER=otlp
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
The package documentation shows the Apache variant with php_value auto_prepend_file in .htaccess and links to a Docker example based on the official WordPress image. Remember that PHP-FPM clears environment variables by default, so set them with env[...] in the pool configuration. Send data to a local OpenTelemetry Collector and use distributed tracing to follow requests into downstream services. Add structured logs with trace IDs so PHP warnings land next to the request that caused them. The packages are still versioned below 1.0, so check the OpenTelemetry registry for the current status before rollout.
Alert thresholds and a WordPress performance checklist
The thresholds below are examples to start from. Calibrate them against a few weeks of your own baseline.
| Signal | Why it matters | Example alert |
|---|---|---|
| p95 TTFB, uncached pages | Shows plugin, query and PHP regressions | Above 2x the 7-day baseline for 10 min |
| Checkout error rate | Lost orders | Above 2 % for 5 min |
| PHP-FPM active / max_children | Saturation precedes 502/504 | Above 85 % for 10 min, or listen queue above 0 |
| Page cache hit rate | Misses push load onto PHP and MySQL | Drop of 20 points against baseline for 15 min |
| Object cache evictions / hit ratio | Database takes over cache load | Evictions rising while hit ratio falls |
| Queries per request (per page type) | Detects N+1 patterns after updates | 2x baseline after a deploy |
| Autoloaded options size | Loaded on every request | Above 800 KB (Site Health threshold) |
| Overdue cron / failed scheduled actions | Emails, renewals and imports stall | Overdue for more than 15 min |
| External HTTP latency per host | Third parties block workers | p95 above 2 s or timeouts above 1 % |
| LCP / INP (p75, RUM) | What visitors feel | Above "good" threshold for a day |
WordPress performance monitoring checklist
- TTFB p95/p99 per page type: cached, uncached, admin-ajax, REST, wc-ajax, wp-cron
- Web server logs with request and upstream time
- PHP-FPM status page, slow log and OPcache metrics collected
- MySQL slow query log enabled; queries per request tracked
- Autoloaded options size measured daily; leftovers from removed plugins cleaned up
- Persistent object cache in place; hit ratio and evictions monitored
- Page cache status header logged; hit rate per page type
DISABLE_WP_CRONwith a system cron, monitored for missed runs- External HTTP calls tracked per host with sensible timeouts
- Cart and checkout with an SLO and a synthetic journey
- Action Scheduler pending and failed actions monitored
- Core Web Vitals from RUM, segmented by template and device
- OpenTelemetry extension, SDK, WordPress and mysqli instrumentation installed
- Plugin, theme and core updates recorded as deploy markers
How Obseria helps with WordPress performance monitoring
Obseria is an OpenTelemetry-native observability platform, so the PHP extension and WordPress instrumentation packages above work without a proprietary agent. Traces, PHP-FPM metrics, MySQL and Redis signals and real user data from the same site end up in one place, and the PHP integration covers the runtime underneath WordPress.
- Obseria Pipeline filters and samples telemetry and masks personal data such as customer emails before storage in the EU.
- Obseria Intelligence correlates a plugin update, a slow query and a saturated FPM pool into one root cause with evidence.
- RUM, synthetics and SLOs with burn-rate alerts cover the checkout journey from the browser to the database.
You can connect your WordPress site in a few minutes with a free Obseria trial.