HTTP 500 Internal Server Error

Status code 500 · Class 5xx

HTTP

Internal Server Error

Also searched as: error 500, HTTP 500, 500 internal server error

HTTP request chain from browser through CDN and proxy to the origin server
HTTP errors: find which hop in the request chain failed and read its logs.

What it means

500 Internal Server Error means the server hit an unexpected problem while handling the request and could not say anything more specific. It is a server-side failure: a crashed script, a broken configuration or a database error. Visitors can only retry; owners must read the logs.

Applies to: All browsers, nginx, Apache, IIS, WordPress, PHP

How to fix HTTP 500 Internal Server Error

  1. Reload the page after a minute; temporary errors often clear on their own
  2. Clear cookies for the site in case a corrupted session triggers the bug
  3. Try again later and report the time and URL to the site owner if it persists
  4. If you own the site: read the error log first (nginx/Apache error.log, PHP-FPM log, application logs) for the exact exception
  5. If you own the site: undo the latest change (deploy, plugin, .htaccess edit, config change) to confirm it is the cause
  6. If you own a WordPress site: enable WP_DEBUG_LOG, rename the plugins folder to disable all plugins, and increase PHP memory if 'Allowed memory size exhausted' appears
  7. If you own the site: check file permissions and syntax errors in .htaccess, which commonly produce 500 on Apache

Why it happens

Any unhandled exception or misconfiguration produces 500: code bugs, missing environment variables, database connection failures, invalid .htaccess directives, exhausted memory and permission problems.

FAQ

Is a 500 error my fault?

Almost never. It is a server problem; you can only retry or contact the site.

How do I find the cause of a 500 error on my site?

Read the server and application error logs at the time of the request. The log line names the failing file or exception.

Related errors

Source: IANA HTTP Status Code Registry · fixes written and reviewed by the editors (see our editorial policy)

Last updated: