Skip to content

cPanel

Error pages and the 500 that is not PHP

Learn how to tell a true PHP fatal from an HTTP 500 caused by .htaccess, permissions, or server limits.

Updated Aug 29, 20263 min read14 reads
Error pages and the 500 that is not PHP
When an HTTP 500 never reaches PHP

An HTTP 500 means the server could not finish the request. On our shared hosting stack with cPanel, LiteSpeed, and CloudLinux, that failure is often a bad .htaccess rule, wrong permissions, or a LiteSpeed limit rather than a PHP fatal. Check the error log before you disable plugins, because many of these errors never reach PHP at all.

PHP fatals versus errors that never reach PHP

WordPress white screens often come from PHP fatals that do reach the interpreter. An HTTP 500 that stops earlier usually points at rewrites, permissions, or server limits. Directories set to 644, wp-config.php left at 777, or a mismatch with lsphp can all return a 500. Set directories to 755 and files to 644. A broken rewrite can loop until the server gives up, which may look like a 500 or a 508. A 508 often means CloudLinux LVE limits. A 503 often means overload or a crashed PHP process. A 500 usually means a config problem or a fatal. Treat each code on its own terms.

Read the error log first

In cPanel, open Metrics and then Errors, or pull the log from the shell. The first line tied to the first 500 is the one that matters. Later lines are often only consequences of that first failure.

bash
tail -n 50 ~/logs/error_log 2>/dev/null || tail -n 50 ~/public_html/error_log

Read from the top of that output, not the bottom of a long repeating loop. Custom error pages can hide the real status code. Run curl -I against the URL so you see the actual number, and trust that header. When you open a ticket, paste the first error_log line and say whether renaming .htaccess changed anything.

When .htaccess is the problem

Rename .htaccess to something like .htaccess.bak and reload the site. If the site returns, you found the cause. Restore a minimal file with only the rules you still need. Disabling every plugin because .htaccess had a typo only adds a second outage on top of the first one.

Disk space and other quiet causes

A full disk can produce a 500 in ways that look like PHP. If the log itself cannot rotate, check your quota next. A large WordPress site on a normal allocation is less often the culprit than a filled quota or a stuck log.

Share

Send this article

Need someone else to do this? Send them the link — the commands are in the article.

Was this article helpful?

Be the first to rate this article.