# How to enable PHP error logging in cPanel

> Switch on PHP error logging from cPanel's Select PHP Version tool so warnings and errors are written to an error_log file you can review when troubleshooting your site.

Source: https://www.kualo.com/knowledgebase/cpanel-php/how-to-enable-php-error-logging-in-cpanel
Updated: 2026-06-13

---

When something on your site misbehaves, the PHP error log is usually the quickest way to find out why. Before you can check it, PHP error logging needs to be enabled for your account.

## Enabling PHP error logging

1. Log in to cPanel and open **Select PHP Version**, under the **Software** section.

![Select PHP Version in cPanel's Software section](https://kb-cdn.kualo.com/d1/9d/d19d5f5304527d2182450263a44ad81aad1218e1.png)

2. The current PHP version and its extensions are shown.

![The Select PHP Version screen showing PHP extensions](https://kb-cdn.kualo.com/3f/4a/3f4a4330479214c0553075a539035c6f49249f1d.png)

3. Switch to the PHP **Options** view (labelled **Switch to PHP Options** in some cPanel versions).

![Switching to PHP Options in Select PHP Version](https://kb-cdn.kualo.com/62/0e/620e985f2b7a804ba6d76023471464588c0e5e57.png)

4. The PHP options for your account are listed.

![The PHP Options screen in cPanel](https://kb-cdn.kualo.com/9f/e2/9fe262e66f0c48ca889040ce36977521cc786dfc.png)

5. Find **error_reporting** and click its current value.

![The error_reporting option ready to be changed](https://kb-cdn.kualo.com/69/37/69370f2b7e07f396cb8fc973b60e2286299a6303.png)

6. Choose **E_ALL** from the drop-down menu to enable full error reporting, then apply/save the change.

![Selecting E_ALL from the error_reporting drop-down](https://kb-cdn.kualo.com/6f/21/6f21a3ee966435daf4597cceaeb2fb702ff9b21d.png)

## Where to find the errors

New PHP errors and warnings are written to a file named `error_log` in the folder the failing script runs from - for most sites that means your application's root folder, such as `public_html`.

:::tip
Once you've finished troubleshooting, consider setting error_reporting back to its previous value - full error reporting can be noisy on a busy site.
:::


---

_Source: Kualo Knowledgebase — https://www.kualo.com/knowledgebase/cpanel-php/how-to-enable-php-error-logging-in-cpanel · © Kualo Ltd._
