dev3 ·
After editing .htaccess, my site returns "500 Internal Server Error" and there is no message at all. How do I find out the cause?
#wordpress#troubleshooting#php
0
DEV3 Developer Forum
Every post is reviewed first. Usually reviewed within 24 hours.
After editing .htaccess, my site returns "500 Internal Server Error" and there is no message at all. How do I find out the cause?
#wordpress#troubleshooting#php
A 500 is a generic server failure. The real message is in the server error log, not in the browser.
Read the log
/var/log/apache2/error.log (Debian/Ubuntu) or /var/log/httpd/error_log./var/log/nginx/error.log and /var/log/php8.3-fpm.log.sudo tail -n 50 /var/log/apache2/error.log
Typical causes and fixes
.htaccess (your case). Rename it to .htaccess.bak; if the site returns, the file is broken. Typical errors are a directive from a missing module ("Invalid command ... perhaps misspelled or defined by a module not included") or php_value lines on a PHP-FPM server. Regenerate the default rules by saving Settings > Permalinks, or paste the standard WordPress block.WP_DEBUG_LOG (see white screen topic).wp core download --force --skip-content replaces core without touching wp-content.Nginx note: Nginx does not read .htaccess, so a 500 there is from the Nginx config or PHP-FPM; check nginx -t.
Always change one thing and retest. Keep a copy of the working .htaccess. You can generate a clean one with the htaccess generator.