← Back to Hosting Management

Managing Error Logs

Error logs record PHP errors, server warnings, and application failures. Reviewing them is the fastest way to diagnose why a page is broken, a script is failing, or a site is slow.

Accessing Error Logs in cPanel

Go to Metrics > Errors in cPanel. This shows the last 300 lines of your Apache error log. For more detailed logs, use File Manager to browse to your logs or public_html/logs directory and download the full log file.

Enabling PHP Error Display

During development, you can display PHP errors on screen by adding this to your .htaccess:

php_flag display_errors on\nphp_value error_reporting E_ALL
Warning: Never display PHP errors on a live production site β€” it can expose sensitive information. Disable this before going live.

Common Error Types

  • 500 Internal Server Error β€” usually a PHP fatal error or bad .htaccess rule
  • 403 Forbidden β€” incorrect file permissions or a directory protection rule
  • 404 Not Found β€” a file or URL doesn't exist; check for typos
  • PHP Fatal Error β€” a plugin or theme conflict; disable recently added code

Was this article helpful?

On This Page