How to View cPanel Error Logs

cPanel comes with an error log section that allows you to view errors generated by your website. In this article, we will review how to view your error logs for both Apache and PHP from within cPanel. For more information, we have a full guide that also lists the locations of cPanel logs for access, Apache, email, error, ftp, mysql, and WHM.

Don’t have time to read the article? Watch our walk-through video.

What is the Error Log?

cPanel states, “This function will display the last 300 errors for your site. This can be very useful for finding broken links or problems with missing files. Checking this log frequently can help keep your site running smoothly.” What this means is when your site is visited by someone, the server receives a request from that visitors browser and location to your server. When the visitor hits a section of your website and they cause an error, the error log will log the date, time, IP , page the error occurred and so forth. These errors could be caused for a number of reasons. Below are a few reasons why errors would be thrown.

There are many reasons your site could have errors. Its a good idea to check you error log frequently to fix web crawler problems that effect your search engine ranking and website functionality.

cPanel Error Log

You can find your cPanel Error log by following the steps below.

  1. Login into your cPanel.
  2. Go to Metrics > Errors.
    cPanel error log icon
  3. Your error log will display in the box. cPanel will display the last 300 errors through the Error Log interface.
    cPanel error log sample

How do I read error log?

Below is an excerpt of a typical error in the cPanel Error log. There are many different error types you may receive. The below is an error on a missing file with a brief description.

Date and Time logged Type Visitor IP Address [Fri May 17 21:07:47 2013] [error] [client] Location of the Error File does not exist: /home/userna5/public_html/400.shtml, Domain Referrer referer:

PHP Error Logging

By default, InMotion disabled PHP error logging on all servers. In order to troubleshoot your PHP code, PHP errors can be enabled to display and log errors using your local php.ini file or ini_set() in a specific PHP file. Then, any errors will be logged within a file labeled error_log in the same directory that the script produced the error. For more information, see our full guide on How to Display and log errors for PHP.

php Error Log Sample

Within the file, you will see each error that was logged on a separate line. First, it will list the date and time that the error was produced, then the actual error. Reviewing this periodically will help you provide the best experience possible for your visitors to ensure that they are not seeing repeat errors on your website.

9 thoughts on “How to View cPanel Error Logs

  1. Hi there,
    The error log only create itself if thre is some error? if there’s none, i will not have the error_log right =?

    1. Yes, that is correct Nicolas. If you do not have an error_log and you enable error logging, then the error_log will be created when an error occurs.

    1. Hi … I am calling-out to a vendor’s API that SOMETIMES generates a 500. They insist that there is nothing on their API that can generate the 500 error. I’ve enabled PHP logging on my site but that also doesn’t show anything.

      Can you tell me where to look to diagnose this issue? The issue occurs here:

      echo “Good”;
      echo “Bad”;

      “Good” is displayed … then 500.


    2. If it’s a general 500 error then probably the best thing to do is to parse the Apache error logs (web server). It should be able to provide you a more specific source of the problem. If you are unable to do this, then you will need to contact our live tech support team for assistance. You can find their contact information at the bottom of the page.

    1. If you are on a VPS you can delete or clear the contents of any file you wish. For shared servers, the files are saved and new ones started every 7 days or so.

Was this article helpful? Join the conversation!

Shop the Black Friday Sale
Hurry! These Deals Won't Last Long