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
- Log in to cPanel.
- Go to Metrics > Errors.
- 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.logFor PHP application errors, also check:
tail -100 /home/username/logs/yourdomain.com-php.error.logCommon Causes of 500 Errors
- Syntax errors in .htaccess - A typo in a rewrite rule can break the entire site. Try renaming
.htaccesstemporarily 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
644and directories755. - Memory limit exceeded - Increase
memory_limitin your PHP settings. - Missing dependencies - Running
composer installmay 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 -1Remember 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
