How to Enable PHP Error Logs in cPanel?

0
403
How to Enable PHP Error Logs in cPanel?
How to Enable PHP Error Logs in cPanel?

PHP error logs most useful tool for diagnosing Webhosting problems. It is usually hard to find the reason for sudden behavior in different PHP applications. PHP error logs can assist you to find issues and recognize the offending theme, plugin, or custom code. In this article, we explain what are PHP error logs, and why they are helpful.

What is a PHP Error Log?

A PHP error log lists the errors and warning messages, which are created by the language runtime, and saved to a file. Errors happen for lots of reasons. For example, a line of code might have a typo mistake in it, or the code might be fine, but something unforeseen occurs when it has been executed. Or, the programmer wants to let you know that so they develop code to log a report to a file. Error logs are a time-ordered list of these messages. Error logs are especially helpful for solving out why WordPress is not behaving as you think. If it is using unnecessary server resources, a plugin is crushed, or pages do not load, the logs can inform you of the reason. If you are in a “White Screen of Death” situation, where WordPress is not working at all, the logs might be the entire way to see what is going on.

How To Log PHP Errors?

To enable PHP Errors, you may following the below steps:

  • On the next page, you will two tabs:
    • Basic Mode
    • Editor Mode
  • Stay in “Basic Mode” and from the drop-down select your domain.
  • Then, you will find below “display_errors”.
  • Click to “Enable”
  • Click on “Apply”

Now, your “display-errors” Mode has enabled.

If go to “Editor Mode”, select the domain and in below box, you can see “display-errors” showing “ON”.

LEAVE A REPLY

Please enter your comment!
Please enter your name here