When a WordPress site breaks, junior operators look at debug.log first and stop. That misses the layer the user actually hit. A WordPress incident touches four logs — the web server’s access and error logs, the PHP-FPM pool log, and WordPress’s own debug.log — and the trick is reading them in the right order.
What’s happening
A request enters at the web server. Apache or Nginx writes an access log line for it and, if anything went wrong at the proxy or TLS layer, an error log line. The web server hands the request to PHP-FPM, which writes its own log when a worker crashes, exceeds memory, or hits a timeout. PHP executes WordPress, and if WP_DEBUG is on, any PHP notice or warning lands in debug.log (or wherever you pointed WP_DEBUG_LOG). A single failed request can leave a line in any combination of those four files — or, frustratingly, in none of them.
How to verify
Tail all four in parallel and trigger the failing request:
# Apache
tail -f /var/log/apache2/error.log /var/log/apache2/access.log
# Nginx
tail -f /var/log/nginx/error.log /var/log/nginx/access.log
# PHP-FPM (path varies by pool)
tail -f /var/log/php8.2-fpm.log /var/log/php-fpm/www-error.log
# WordPress
tail -f /var/www/example.com/wp-content/debug.log
Use multitail or lnav if your terminal supports it — both colour-code by file. Capture the request’s timestamp in UTC before you reproduce, then grep each log for that timestamp ±2 seconds.
The fix
- Start at the access log. Confirm the request actually reached the server. If there’s no entry, the problem is DNS, CDN, or the firewall — not WordPress.
- Check the web server error log next. Upstream timeouts (
upstream timed out), connection refused, and TLS handshake failures all live here. None of them will show up in PHP or WordPress logs. - Then PHP-FPM. Look for
WARNING: [pool www] child ... exited on signal 9 (SIGKILL)(OOM kill),Process Managersaturation messages, or slow-log entries ifrequest_slowlog_timeoutis set. - Finally
debug.log. This is where PHP notices, warnings, deprecated calls, andwp_die()traces live. It’s the most detailed but also the most filtered — a 500 from a worker crash never reaches it. - Correlate by timestamp. A real diagnosis lines up the same request across all four logs. If they disagree, you’ve found the layer that swallowed the error.
- Set up
logrotatefordebug.log— it has no built-in rotation and will grow until it fills the disk.
For environments where logs across multiple servers need to be correlated centrally, Stack Harbor ships log aggregation as part of enterprise WordPress support. For help triaging a current incident, book a consult.