Why a 500 tells you almost nothing
Where the errors actually go
| Stack | Web server errors | PHP errors |
|---|---|---|
| Apache on Debian/Ubuntu | /var/log/apache2/error.log | Same file with mod_php; with PHP-FPM, check the pool's error_log setting |
| Apache on RHEL-family | /var/log/httpd/error_log | Same idea as above |
| Nginx + PHP-FPM | /var/log/nginx/error.log | Pool error_log if set, otherwise often relayed into the Nginx error log |
| cPanel (Apache or LiteSpeed) | /usr/local/apache/logs/error_log | Often a file named error_log next to the script that failed, e.g. in public_html |
| LiteSpeed (standalone) | /usr/local/lsws/logs/error.log | Depends on lsphp settings; check php.ini error_log and the site directory |
| WordPress itself | n/a | wp-content/debug.log when WP_DEBUG and WP_DEBUG_LOG are enabled |
BASH
# Debian/Ubuntu: see whether any PHP-FPM pool sets its own error log
grep -Rn 'error_log' /etc/php/*/fpm/
# Watch the web server error log while you reload the failing page
sudo tail -f /var/log/nginx/error.log
# Pull the most recent PHP fatal errors from that log
sudo grep -n 'PHP Fatal error' /var/log/nginx/error.log | tail -n 20Reading a fatal error line
TEXT
Illustrative output format:
2026/01/01 10:00:00 [error] 1234#1234: *5678 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function example_get_settings() in /var/www/site/wp-content/plugins/example-forms/includes/render.php:42
Stack trace:
#0 /var/www/site/wp-content/themes/example-theme/functions.php(118): example_forms_render()
#1 /var/www/site/wp-includes/class-wp-hook.php(324): example_theme_footer()
...
thrown in /var/www/site/wp-content/plugins/example-forms/includes/render.php on line 42" while reading response header from upstream, client: 203.0.113.10, request: "GET / HTTP/1.1"
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/www/site/wp-includes/class-wpdb.php on line 2200When it really is .htaccess
Disabling the culprit without making things worse
BASH
# Run from the WordPress root. --skip-plugins and --skip-themes keep WP-CLI
# from loading the broken code while you work.
wp plugin list --status=active --skip-plugins --skip-themes
wp plugin deactivate example-forms --skip-plugins --skip-themes
# Without WP-CLI: rename the folder so WordPress can't load it (reversible)
mv wp-content/plugins/example-forms wp-content/plugins/example-forms.disabled