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.
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.
- Page Alias Changed (SEF URL’s or Permalinks changed)
- File was deleted or renamed
- SpamBots trying to manipulate a url
- Missing error pages or robots.txt
- Menu links changed with out redirecting
- Old URLS cached in search engines
- There are many reasons your site could have errors.
You can find your cPanel Error log by following the steps below.
- Login into your cPanel.
- Go to Metrics > Errors.
Cpanel will display the last 300 errors through the Error log interface.
PHP error loging
- Access to your hosting account’s control panel and enabling Error Logging
First of all, you should check whether error logging is enabled on your account by [checking the PHP information.]
2.Opening the Error Log
From now on, when an error occurs on your website, an entry will be made in the error log. After that, use File Manager to open the error log file and check if there are any new entries.