Ffile2fix
Sign in Get started

Fix "500 Internal Server Error"

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

A 500 error means the server hit a problem it could not describe more specifically, so the browser only gets a generic message. The real cause is almost always written to the web server or PHP error log, most often a PHP fatal error, a broken .htaccess directive or wrong file permissions.

Also appears as: HTTP ERROR 500 - This page isn't working. example.com is currently unable to handle this request. · 500 Internal Server Error · There has been a critical error on this website. · AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error.

Common causes

  • A PHP fatal error such as an undefined function, a syntax error or an exhausted memory_limit with display_errors turned off
  • An invalid or unsupported directive in .htaccess, for example a module that is not loaded or php_value under PHP-FPM
  • A rewrite rule that loops until Apache hits its internal redirect limit (AH00124)
  • Scripts or directories that are world-writable or owned by the wrong user, which suEXEC and PHP-FPM setups refuse to run
  • A plugin, theme or Composer update that requires a newer PHP version than the server runs
  • The application cannot connect to its database or cache and throws an uncaught exception

How to fix it

  1. Read the error log first. Check /var/log/apache2/error.log, /var/log/httpd/error_log or /var/log/nginx/error.log, plus the PHP-FPM log (for example /var/log/php8.3-fpm.log). On shared hosting use the Errors section in cPanel or the error_log file in the site folder.
  2. Rule out .htaccess. Rename .htaccess to .htaccess.bak and reload the page. If the 500 disappears, restore the file and remove directives one block at a time until you find the bad line.
  3. Turn on PHP error logging. Set log_errors = On and error_log = /path/to/php-error.log in php.ini or .user.ini, keeping display_errors = Off on production. In WordPress set WP_DEBUG and WP_DEBUG_LOG to true and read wp-content/debug.log.
  4. Fix permissions and ownership. Use 755 for directories and 644 for files, with the site owned by the account PHP runs as. Run find /var/www/site -type d -exec chmod 755 {} + and find /var/www/site -type f -exec chmod 644 {} +.
  5. Disable the last change. If the error started after an update, roll it back or disable the plugin or theme by renaming its folder (for example wp-content/plugins/plugin-name to plugin-name.off).
  6. Check PHP version and limits. Compare the PHP version with what the code requires (php -v, composer.json require.php). Raise memory_limit or max_execution_time only if the log shows those limits being hit.

php.ini / .user.ini (production logging)

display_errors = Off
log_errors = On
error_log = /var/www/site/logs/php-error.log
error_reporting = E_ALL

How to stop it happening again

  • Keep PHP error logging permanently on and monitor the log after each deploy
  • Test updates on a staging copy that runs the same PHP version as production
  • Validate .htaccess changes before uploading them
  • Pin dependency versions and check their PHP requirements before upgrading

Frequently asked questions

Why does the page say 500 but show no details?

Showing internal errors to visitors would leak paths and code, so production servers hide them. The details go to the error log, which is where you need to look.

Is a 500 error my fault or my host's?

Most 500 errors come from the site's own code or configuration. If the log is empty and even a plain index.html fails, the server configuration itself is broken and your host needs to look.

Does a 500 error hurt SEO?

A brief outage does not. If search engines keep getting 500 responses for days, they crawl less and may eventually drop affected URLs from the index.