Diagnosing 500 Errors Print

  • developersgitdeployment, developers, errors, htaccess, php, permissions, wordpress, cpanel, permalinks, troubleshooting
  • 0

The server reporting that something failed.

THE FIRST PLACE TO LOOK

cPanel > Metrics > Errors. A 500 almost always has a corresponding log entry naming the cause.

THE COMMON CAUSES

A syntax error in .htaccess. Rename it and see whether the site returns. A PHP fatal error Permissions wrong, particularly a file set to 777, which our configuration may refuse to execute A missing PHP extension Memory or execution time exhausted A corrupt file from an incomplete upload

THE .HTACCESS TEST

Rename .htaccess to .htaccess.bak. If the site loads, the file was the problem. In WordPress, re-saving permalinks regenerates a clean one.

AFTER A DEPLOYMENT

Suspect the deployment. Roll back and diagnose without the site being down.

AFTER A PHP VERSION CHANGE

Switch back to the previous version and check the log for deprecation and type errors before trying again.

IF THE LOG IS EMPTY

The failure may be before PHP runs, which points at the web server configuration, .htaccess, or permissions.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot