Most cPanel hosts do not have New Relic or Datadog attached, because the customer is not paying for them. When a customer reports “this one page is slow”, you have logs and the command line. The right approach is a fixed triage chain that walks every layer that could be adding latency, in the order they sit in the request path. Skipping a layer means you might fix something that is not actually slow and miss what is.
What’s happening
A slow page on a cPanel + WordPress site touches: CDN/edge (cache hit/miss), web server (LiteSpeed/Apache), modsec (WAF rule evaluation), PHP-FPM (worker assignment), application code (queries, external API calls), MySQL (query execution), object cache (Redis/Memcached lookups), and OpCache (compiled bytecode lookup). Each is a candidate. APM tools attach to PHP and break the request into spans automatically; without APM, you walk the chain manually, checking each layer’s logs for the time window in question.
How to verify
The chain, in order, for a request to https://example.com/slow-page at roughly 14:32 UTC:
# 1. CDN — confirm cache miss/hit at the edge
curl -I https://example.com/slow-page
# look for cf-cache-status, x-litespeed-cache, x-cache headers
# 2. Web server / LiteSpeed cache layer
tail -200 /usr/local/lsws/logs/access.log | grep slow-page
grep slow-page /usr/local/apache/logs/access_log | tail -10
# 3. ModSec — check for rules that ran and added latency
tail -1000 /usr/local/apache/logs/modsec_audit.log | grep -B 2 -A 5 slow-page
# 4. PHP-FPM slow log — must be configured first
tail -200 /opt/cpanel/ea-php82/root/var/log/php-fpm/<user>.slow.log
# 5. MySQL slow query log
mysqldumpslow -s t /var/lib/mysql/slow.log | head -30
tail -500 /var/lib/mysql/slow.log | grep -B 2 -A 10 "User_Host: <user>"
# 6. OpCache status — is the page recompiling every hit
curl -s http://127.0.0.1/opcache-status.php
# 7. Redis — hit rate during the window
redis-cli INFO stats | grep keyspace_
Match timestamps across logs. The slow page took 8 seconds; which layer’s log shows an entry that took 7 of those seconds?
The fix
By the time you get to the bottom of the chain, you have a single layer to fix:
- Cache miss at CDN/LiteSpeed — investigate cache-control headers, query strings that break caching, cookies that force bypass.
- ModSec rule taking time —
SecRulewith greedy regex; disable rule for that path or rewrite it. - PHP-FPM slow log entry — usually a slow external API call or a missing index in a query. Stack trace points at the line.
- MySQL slow query —
EXPLAINit, add the missing index, or rewrite. This is the single most common finding on a WordPress slow-page ticket. - OpCache cold miss — the file got evicted. Sized OpCache too small (covered in the OpCache tuning article).
- Redis miss — TTL too short, or invalidation aggressive. Tune cache lifetime.
The chain is doctrinaire on purpose. Skipping steps because “it’s probably the database” leads to time spent fixing the wrong layer. Stack Harbor uses this triage as part of monitoring and support.