How to find your server and PHP error log files

Displaying the details of your website's failed code to the world is a terrible security risk as it's impossible to predict what might get displayed.

For this reason Krystal's servers are set to NOT display your script errors to the public. This means if your website goes wrong, it won't normally display the reasons to the public. This is a common reason for a website showing a blank or partially blank page.

Errors generated by PHP are logged, but instead of being shown to the world at large, they are recorded in files called error_log. These files get created in the directory containing the script that caused the error.

Errors can also be generated by the web server itself - these are more fundamental errors, and they are sometimes viewable using the cPanel Errors icon found in the METRICS section. These are separate from the PHP errors described above.

Most often, for Content Management Systems (CMS) like WordPress you'll need to view the PHP error_log files to diagnose issues with plug-ins or other functionality that's not working as you'd expect.

How to check your web server Error Log files

In cPanel, you can click on the Errors icon (in the Metrics section of cPanel) to see the most recent errors logged for your account.

This is not an exhaustive list of errors the web server might have logged, so if you can't figure what's gone wrong from what you see, let us know and we can dig a little deeper for you.

PHP error_log files

If you want to look at all historic PHP errors then you will want to look through all the error_log files in your home directory. You can find them by opening File Manager from within cPanel.

Once File Manager is open, you can search for all files called error_log by entering error_log in the top right hand search box and clicking the Go button.

This will show you the location of all of your error_log files.

You can then double click the entries to open File Manager in that directory so you can read the particular error_log file (right-click the error_log file and then select View from the menu).


How did we do?


Powered by HelpDocs (opens in a new tab)
© Krystal Hosting Ltd 2002–