WebGee DocsDocs
Development
Free migration + 30-day money-backSee how

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_log

Or 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:

PatternUsually
Every request, every timeA code or configuration fault
Sometimes, under loadA 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

  1. Rename wp-content/plugins to plugins-off over SFTP. If the site returns, a plugin is responsible — rename it back and disable them one at a time.
  2. Switch to a default theme.
  3. Enable WP_DEBUG_LOG and check wp-content/debug.log — see Enable WP_DEBUG.

On this page

Hosted elsewhere?

Cloud Hosting

cPanel on NVMe storage, with LiteSpeed, free SSL and daily backups included.

See plansFree migration