Error logs record problems encountered by the web server when processing requests. They are your first port of call when troubleshooting website issues like blank pages, 500 Internal Server Errors, or broken functionality.
Please note: Screens and options may vary slightly depending on your cPanel version and hosting plan.
When You Would Use This
Check error logs when your site displays blank pages, 500 errors, broken functionality, or any unexpected behaviour. They are your first port of call for troubleshooting.
Viewing Error Logs in cPanel
- Log in to your cPanel account.
- In the Metrics section, click Errors.
- The page displays the most recent 300 error log entries.
Understanding Error Log Entries
Each entry typically includes:
- Date and time — When the error occurred.
- Error level — The severity (e.g. Notice, Warning, Fatal Error).
- Error message — A description of the problem.
- File and line number — The script and line where the error occurred.
Common Errors
- PHP Fatal error — A critical error that stops script execution. Often caused by calling an undefined function, running out of memory, or a syntax error.
- PHP Warning — A non-fatal error. The script continues but something isn't right.
- File does not exist — A request was made for a file that doesn't exist (404 error). Could indicate broken links or missing files.
- Permission denied — The web server doesn't have permission to read a file. Check file permissions.
- ModSecurity: Access denied — The web application firewall blocked a request.
Viewing the Full Error Log via File Manager or SSH
The error log file is typically located at:
/home/username/logs/error.log
You can view it in the File Manager or via SSH:
tail -100 ~/logs/error.log # Last 100 lines
tail -f ~/logs/error.log # Live view (Ctrl+C to stop)
grep "Fatal" ~/logs/error.log # Search for fatal errors
Tips
- Error logs are essential for debugging. Always check them when your site isn't working as expected.
- Share relevant error log entries when contacting support — it dramatically speeds up troubleshooting.
- For PHP applications, you can control which errors are logged by adjusting the
error_reportingandlog_errorsPHP settings. - Logs are rotated periodically. Very old entries may not be available.
What Next?
- Downloading Raw Access Logs — Full request logs for deeper analysis.
- Understanding CPU and Memory Resource Usage — Check if resource limits are causing errors.