Troubleshooting guide · http-status · Published 2026-08-14 · 3 min read

HTTP 500 internal server error

Why a server returns 500 Internal Server Error, the ordered fix sequence (logs, restart, isolation, permissions, .htaccess, resource limits), and prevention.

Symptoms

The site returns a page that says "500 Internal Server Error" or "500 Internal Server Error: The server encountered an internal error and was unable to complete your request." The browser may show it for one page or the whole site. The most useful detail is what is different at the moment it starts: a new plugin, a theme switch, a deployment, or new environment variables.

Common causes

How to fix

Do these in order. Stop as soon as one restores the site.

  1. Check the server logs first. On most hosts the error log sits under the control panel under "Error logs" or at logs/ next to the site. The real error message names the file and line. This single step resolves most cases.
  2. Restart the process or service if the host lets you. A stuck process can produce a 500 until restarted.
  3. Create a clean test file to isolate the scope. On a PHP site, an empty test.php that prints nothing proves the server itself works, and the failure belongs to the application or its config. Delete the file afterwards.
  4. Turn on visible error reporting temporarily on a non-live copy. For PHP that is error_reporting(E_ALL); ini_set('display_errors', '1'); at the top of a bootstrap file. Never leave display on for production.
  5. Check file permissions. Files should usually be 644 and directories 755. An owner mismatch between uploads and the web process is the classic hidden cause.
  6. Rename the .htaccess file if the site uses Apache. If the site recovers, you have found the problem and can re-add rules one at a time.
  7. Check for resource limits. A memory limit that is too low, or a worker pool that is exhausted, produces intermittent 500s under load. Raise the limit on a dev copy first.
  8. Regress the most recent change. If the error started after an update, disable the new plugin or module, or roll back the deployment, and confirm the site recovers.

Prevention

Need a website built, fixed, optimised, migrated or replaced?

This technical resource is written by CSMBAC, a small design and development studio. If you would rather hand the problem to a professional, the website service page explains how we build enquiry-ready websites.

Explore website services