How to find error logs in cPanel
Help centreOn this page
This guide shows where to find the error messages your website records, so you can see what is actually going wrong.
The Errors page in cPanel
This shows the most recent errors from the web server.
- Log in to cPanel. See how to log in to cPanel.
- In the Metrics section, click Errors.
- Read the list. The newest errors are at the top.
Each line shows the date and time, the visitor’s IP address and the problem. To match an error to what you did, reload the broken page and check the time on the top line.
error_log files
PHP errors are usually written to a file called error_log in the same folder as the script that failed.
- In cPanel, open File Manager.
- Look in
public_htmlfor a file callederror_log. Also check any subfolders, such aswp-admin, if the error happens there. - Right-click the file and choose View or Edit. The newest lines are at the bottom.
These files can grow large. Once you’ve read and fixed the problem, you can delete the file. A new one is created the next time an error happens.
WordPress debug.log
WordPress can keep its own log, which often names the plugin or theme at fault.
- In File Manager, right-click
wp-config.phpand choose Edit. - Above the line that says “That’s all, stop editing!”, add:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
If a WP_DEBUG line is already there, change it rather than adding a second one.
- Save, then reload the broken page.
- Open
wp-content/debug.logto read the errors. - When you’ve finished, set
WP_DEBUGback tofalseand deletedebug.log, as anyone who knows the address could otherwise read it.
What common lines mean
- PHP Fatal error: Allowed memory size exhausted. The script needed more memory than PHP allows. Raise
memory_limitin your PHP options, or find the plugin using it. See how to change your PHP version. - PHP Fatal error: Uncaught Error: Call to undefined function. Code is using something that doesn’t exist, often because of an old plugin on a newer PHP version.
- PHP Parse error: syntax error. A file has a typing mistake in it, usually after someone edited it by hand. The line number is given.
- PHP Warning or PHP Deprecated. Usually harmless and won’t break the site, though they’re worth passing on to the plugin’s developer.
- Permission denied. A file or folder has the wrong permissions. Files are normally 644 and folders 755.
- client denied by server configuration. A rule, often in
.htaccess, is blocking access.
If it doesn’t work
- The logs are empty. The problem may not be a PHP error. Check your account’s limits under Resource Usage in cPanel.
- The error names a plugin you don’t recognise. Your site may have been changed without your knowledge. See how to scan your site for malware.
Good to know
For what the error numbers like 403 and 500 mean, see what website error codes mean.
Still stuck? Open a support ticket and we’ll help.
Every plan has cPanel, free SSL, backups every six hours and free migration.