Free migrationUK web hosting from £2.99 a month, with backups every six hours and a 60-day money-back guarantee.UK web hosting from £2.99 a month.See hosting plans

How to find error logs in cPanel

On 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.

  1. Log in to cPanel. See how to log in to cPanel.
  2. In the Metrics section, click Errors.
  3. 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.

  1. In cPanel, open File Manager.
  2. Look in public_html for a file called error_log. Also check any subfolders, such as wp-admin, if the error happens there.
  3. 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.

  1. In File Manager, right-click wp-config.php and choose Edit.
  2. 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.

  1. Save, then reload the broken page.
  2. Open wp-content/debug.log to read the errors.
  3. When you’ve finished, set WP_DEBUG back to false and delete debug.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_limit in 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.

Still stuck? Open a support ticket from your client area. Tell us your domain and which step went wrong, and we'll take it from there.
UK cPanel hosting from £2.99 a month

Every plan has cPanel, free SSL, backups every six hours and free migration.

See web hosting
Open in new tab