Fix a 500 Internal Server Error
A 500 Internal Server Error is the web’s generic “something broke in the app.” It’s deliberately vague to visitors — the actual cause is waiting in your logs.
Step 1: read the log (this is the whole game)
The error that caused the 500 is logged with a stack trace. Check the app/PHP log via the panel or the web terminal:
tail -n 100 app.log # or storage/logs/laravel.log, etc.Reproduce the request while running tail -f and watch the error appear. See
read & manage logs. The log names the
file, line, and message — that’s your fix.
Common causes
| Cause | Fix |
|---|---|
| PHP fatal error (often shows as a white screen or 500) | read the PHP log; fix the code / missing extension |
| Missing env var / config | set it as an environment variable |
| Database connection failed | check DB credentials and that the DB is up |
| File permissions | app can’t read/write a needed file → fix permissions |
| Un-run migration / bad schema | run migrations → update & maintain apps |
Bad .htaccess / rewrite (PHP) | a syntax error there 500s the whole site |
| Out of memory | raise memory_limit; check resources |
500 vs 502 vs 504
- 500 — the app ran and threw an error → read the app log (this page).
- 502 — the app wasn’t reachable (crashed / wrong port).
- 504 — the app was too slow to respond.
WordPress 500s
Usually a plugin/theme conflict or a memory limit. Enable WP_DEBUG on a staging
copy to see the error, bump memory_limit, and disable the suspect plugin —
secure/maintain WordPress.
Running OrbixPanel? App logs are viewable in the panel, so the cause of a 500 is a click away. OrbixPanel.com → — the free, self-hosted, AI-powered hosting control panel.