How to Troubleshoot 500 Errors Using Error Logs

A 500 Internal Server Error means something went wrong on the server side - but it doesn't tell you what. The key to diagnosing 500 errors is checking your error logs, which contain the actual error messages that caused the failure.

Method 1: Check Error Logs in cPanel

  1. Log in to cPanel.
  2. Go to Metrics > Errors.
  3. Review the most recent entries - look for file paths, PHP errors, or permission issues.

Method 2: Check Log Files via SSH

Error logs are typically stored in your account's logs directory. Connect via SSH and run:

tail -100 /home/username/logs/yourdomain.com.error.log

For PHP application errors, also check:

tail -100 /home/username/logs/yourdomain.com-php.error.log

Common Causes of 500 Errors

  • Syntax errors in .htaccess - A typo in a rewrite rule can break the entire site. Try renaming .htaccess temporarily to rule this out.
  • PHP syntax errors - A missing semicolon or bracket in a PHP file causes a fatal error.
  • Incorrect file permissions - PHP files should typically be 644 and directories 755.
  • Memory limit exceeded - Increase memory_limit in your PHP settings.
  • Missing dependencies - Running composer install may be required after deploying.

Enabling Detailed Error Display (Development Only)

To temporarily show errors in the browser, add this to your .htaccess:

php_flag display_errors On
php_value error_reporting -1

Remember to disable this on a live site. If you can't identify the cause, contact our support team - share the error log entry and we'll help you get to the bottom of it.

100% Satisfaction Guarantee

We're so confident you'll love dotCanada that we offer a 30-day money-back guarantee. Not satisfied? Get a full refund, no questions asked.

Ready to Get Started?

Join thousands of Canadian website owners who trust dotCanada for reliable, fast web hosting.

Get Started Today