Knowledgebase

How to enable PHP error reporting in WordPress

If for troubleshooting purposes you want to turn on error reporting, you can do so by modifying a single line in the wp-config.php file of your WordPress. In the file there should be the following line:

define('WP_DEBUG', false);

Just change false to true so that the line becomes:

define('WP_DEBUG', true);

In case you don't find such a line you can add it. If you get the so called white screen of death or something is not functioning correctly, you can enable this debugging mode to check for any PHP errors. If there's something wrong, the error will be shown when you open your site or load a particular page.

The wp-config.php file is located in the root WordPress directory on your WordPress hosting account. You can edit it from the Files section of the Pixie control panel. Another way to do it is to download it on your local computer with an FTP client, edit it with a text editor (e.g. Notepad, WordPad) and upload it back replacing the old file.

After you're done fixing the problem for security reasons it's recommended to disable this error reporting function.

Note that fatal errors will be displayed even without enabling error reporting. But it's useful for minor problems.

Was this answer helpful?

 Print this Article

Also Read