Troubleshooting

500 Internal Server Error: causes and fix

Quick answer: A 500 means the site's server hit an unexpected error while building the page. Visitors should wait and refresh; site owners should check the error log, recent changes and .htaccess.

General Medium About 20 min 8 steps Internet, Browser & Website Errors
500 Internal Server Error: causes and fix — A young woman sits on a balcony at sunset with a laptop on her knees, rubbing her temple.

Symptoms

  • A plain page saying "500 Internal Server Error"
  • In Chrome: "This page isn't working" with "HTTP ERROR 500"
  • A completely blank white page with no message (on some sites)
  • The error started right after a change (new plugin, update, file edit)

Likely causes

  1. An error in the site's code (PHP, a script, a plugin or a theme) stopped the page from being built.
  2. A wrong or unsupported directive in .htaccess or the web server configuration.
  3. Running out of memory or hitting PHP limits.
  4. Wrong file permissions or an incompatible PHP version after a hosting change.
  5. The app lost its connection to the database or another service it depends on.

Step-by-step fix

Start from step one and test again after each step; steps go from the simplest to the most technical.

  1. Wait a moment and refresh

    A 500 is sometimes momentary, for example during a site update. Wait a minute and press F5. If you had submitted a form, check whether it went through before sending it again so it isn't duplicated.

  2. Try an Incognito window

    A broken cookie rarely causes a 500, but it's quick to rule out. Open the site in Incognito; if it works, clear that site's cookies. If it shows a 500 there too, the problem is entirely on the site's server.

  3. Tell the site's support

    If the error continues, send the site's support the page URL, the time and what you were doing. There's nothing more a visitor can do.

  4. Site owners: read the error log

    Open "Errors" or the error_log file in your hosting control panel, or the web server log on a VPS. A line like "PHP Fatal error" names the file and line at fault; start there.

  5. Site owners: undo the last change

    If the error began after installing or updating a plugin, theme or library, or editing code, roll that change back or disable that part. In WordPress you can temporarily rename the suspect plugin's folder in File Manager.

  6. Site owners: test .htaccess

    Back up .htaccess and temporarily rename it. If the site loads, one of its directives (for example one your host doesn't support) is the culprit. In WordPress, then click "Save Changes" once under "Settings > Permalinks" to generate a clean file.

  7. Site owners: check PHP and permissions

    Match the PHP version in your hosting panel to what the site needs and raise memory_limit if required. Folders should be 755 and files 644; 777 permissions alone trigger a 500 on some servers.

  8. Site owners: contact your host

    If the log is empty or the error is server-related (for example ModSecurity or the database), give your host the exact time and page URL so they can check server-level logs.

If nothing worked

If you're a visitor and still get a 500 after a few hours, the problem is in the site's code or server and only its owner can fix it; check the official channels.

If you own a WordPress site, the dedicated WordPress 500 error guide has more specific steps. Always back up before editing files or changing the PHP version.

Don't leave error display switched on for visitors on a live site; it exposes file paths and sensitive server details.

Frequently asked questions

What's the difference between 500, 502 and 503 errors?

A 500 means the site's own application failed while building the page (usually a bug or a bad setting). A 502 means a gateway got an invalid response from the origin, and a 503 means the server is unavailable because of load or maintenance. Fixing a 500 almost always starts with the error log.

Why is the error log empty?

Error logging may be turned off, or the error happened before PHP ran (for example in .htaccess). Check the web server log too and enable logging errors to a file, but don't turn on error display for visitors on the live site.

Related problems

Terms used on this page

More Internet, Browser & Website Errors problems

All problems Internet, Browser & Website Errors

Last updated:

Type a few letters of the topic; spelling variants are treated as the same.