A 500 Internal Server Error is the most generic failure WordPress can throw — and that’s exactly why it’s hard. It means “something broke and the layer that returned the response refused to be specific”. The diagnostic isn’t a single check, it’s a structured walk through five candidate layers in a fixed order.
What’s happening
The 500 is returned by whichever component first decided the response was unrecoverable. PHP-FPM returns 500 when a worker dies mid-request (memory exhausted, segfault, child killed by the OS). The web server returns 500 when it can’t talk to the FPM socket or when an .htaccess directive is malformed. WordPress can render its own 500 from wp_die() after catching a fatal — but only since PHP 7’s fatal error handler made that possible. Most often what users see as a “WordPress 500” is actually PHP-FPM returning to Nginx or Apache because a worker died.
The five usual suspects: a plugin fatal (most common), PHP memory exhausted, a malformed .htaccess rule, an open_basedir violation, or filesystem permissions wrong on wp-content.
How to verify
Capture timestamps and walk the layers:
tail -f /var/log/nginx/error.log /var/log/php8.2-fpm.log wp-content/debug.log
curl -I https://example.com/
curl -v https://example.com/ 2>&1 | grep -E "HTTP|X-"
wp plugin list --status=active --field=name
wp eval 'echo ini_get("memory_limit"), "\n";'
ls -la wp-content/ wp-content/plugins/ wp-content/uploads/
If wp runs but the public site returns 500, the issue is in the web layer (PHP-FPM socket, .htaccess, permissions). If wp fails too with a fatal trace, it’s a plugin or theme.
The fix
- Read the PHP-FPM log first. A line like
WARNING: [pool www] child 1234 exited on signal 9 (SIGKILL)means the OOM killer hit the worker — raisememory_limitor find the leak. A segfault means a PHP extension is broken. - Read the WordPress fatal entry. In
debug.logor PHP’serror_log, a fatal will include the file and line. Find the responsible plugin from the path. - Disable plugins via WP-CLI.
wp plugin deactivate --allis the fastest bisect. If the 500 clears, reactivate one at a time. If WP-CLI can’t reach the database, the issue is upstream of plugins. - Check
.htaccess. Rename it temporarily; if the site recovers, the file had a malformed rule. Common culprits:RewriteRulesyntax errors, missingIfModulewrappers, security plugin additions. - Verify permissions.
wp-content/should be755, files644, owned by the user the FPM pool runs as. If a backup tool ran as root and left files owned by root, FPM getsPermission deniedand returns 500. - Raise memory_limit if needed. Set
WP_MEMORY_LIMITinwp-config.phpandmemory_limitinphp.inito at least256Mfor an active site. 128M is no longer enough for most plugins.
For sites where 500 errors recur and you need a permanent monitor on the four logs simultaneously, Stack Harbor delivers that as part of enterprise WordPress operations. For triage on a current 500, book a consult.