HTTP error reference
500 Internal Server Error
A 500 Internal Server Error is the server’s catch-all: something went wrong while handling the request and it has no more specific code to give. The message itself tells you almost nothing. The real error is in the server or application log.
If you are visiting the site
Reload once. If the error stays, the site owner has to fix it; clearing your cache will not help.
Common causes
A code error
A PHP fatal error, an uncaught exception or a typo in a recent change. This is the most common cause, often straight after an update or deployment.
A bad .htaccess file
On Apache, a single invalid line in .htaccess makes every page under that folder return 500.
Memory limit reached
A script needs more than PHP’s memory_limit allows and stops with “Allowed memory size exhausted”.
Wrong permissions or ownership
Some hosts refuse to run scripts that are writable by everyone, or owned by the wrong user, and return 500 instead.
A missing setting or service
A missing environment variable, a database that refuses connections, or a PHP extension that is not installed.
How to fix it
Find the error
- Check the web server’s error log and the application log at the time of the 500. Laravel writes to storage/logs; WordPress writes to wp-content/debug.log once WP_DEBUG and WP_DEBUG_LOG are on.
- Do not show error details to visitors on a live site; log them instead.
WordPress
- If you cannot reach the dashboard, rename the wp-content/plugins folder to disable all plugins at once. If the site comes back, rename it back and re-enable plugins one by one.
- Switch to a default theme to rule out the theme.
Apache
- Rename .htaccess temporarily. If the error goes away, the file has a bad directive; for WordPress, saving Settings → Permalinks writes a fresh one.
After a deployment
- Roll back to the last working release while you investigate, rather than debugging on the live site.
Quick checklist
Match the request time to application logs.
Inspect recent deployments and dependency errors.
Keep debug traces private; do not expose environment variables to visitors.
Questions about 500 errors
Is a 500 error my fault?
If you are a visitor, no. It is a fault on the server, and only the site owner can fix it.
Why does the error page say nothing useful?
On purpose. Detailed errors can leak passwords and file paths, so servers show a generic page and write the details to a log.
Can a plugin cause a 500?
Yes, and in WordPress it is the most common cause, especially after an update. Disabling plugins is the quickest test.