Diagnose a PHP 500 error
A 500 error tells you nothing on its own. Read the log first — and whether it is constant or intermittent points at two different causes.
Your site returns 500 Internal Server Error. Applies to shared, reseller and Premium hosting.
A 500 is deliberately generic — the detail is in the log, not the page.
Start with the log
Nothing else here is worth trying first:
tail -n 50 ~/public_html/error_logOr open error_log in File Manager with hidden files shown — see
Find your error log.
The entry names the file and line. That is usually the whole diagnosis.
If the file is empty or missing, turn logging on — see Enable error logging in PHP.
Constant or intermittent
The pattern narrows it considerably:
| Pattern | Usually |
|---|---|
| Every request, every time | A code or configuration fault |
| Sometimes, under load | A resource limit — memory, or entry processes |
Constant 500s
A fatal PHP error. The log names it. Typically a plugin or theme calling something that does not exist after an update, or a syntax error in a file you just edited.
A broken .htaccess. Rename it to .htaccess.bak and reload. If the site
comes back, the file is the cause. A single mistyped directive does this — see
Force HTTPS for one that used to be documented
incorrectly here.
Wrong permissions. Files that are group- or world-writable are refused by
suEXEC. Set directories to 755 and files to 644 — see
File and directory permissions.
An unsupported PHP version. An application requiring a newer version than the one selected. See Change your PHP version.
Intermittent 500s
Usually a resource limit reached under load.
Memory. Raise memory_limit in Select PHP Version → Options — see
Understanding PHP memory limits.
If the site needs far more than the default, something is wrong: investigate
rather than raising it repeatedly.
Entry processes. Requests killed at the limit produce a 503, but a partly served request can surface as a 500. Check cPanel → Resource Usage — see Fix a 503 Resource Limit Reached error.
WordPress specifically
- Rename
wp-content/pluginstoplugins-offover SFTP. If the site returns, a plugin is responsible — rename it back and disable them one at a time. - Switch to a default theme.
- Enable
WP_DEBUG_LOGand checkwp-content/debug.log— see Enable WP_DEBUG.