> ## Documentation Index
> Fetch the complete documentation index at: https://kb.hosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enabling debugging and error log in WordPress

> Learn how to enable debugging mode and error log in WordPress with a simple lines of script.

Occasionally, your site may encounter a plugin conflict or other difficulty that prevents it from loading or accessing the Administration Dashboard. [WordPress](https://hosting.com/hosting/platforms/wordpress-hosting/managed-wordpress-hosting/) error logs may assist you in determining the source of problems on your site; but, in order to generate those logs, you must enable a feature called Debugging Mode, which by default is disabled for security reasons. Debugging mode will generate a file containing a list of all error messages encountered on your site.This tutorial will walk you through the process of enabling debugging in [WordPress](https://hosting.com/hosting/platforms/wordpress-hosting/managed-wordpress-hosting/).

## Enabling debugging mode in WordPress

To enable debugging in WordPress, follow these steps:

1. Log in to cPanel.

2. > 📘 Note
   >
   > If you do not know how to log in to your cPanel account, please see [this article](/docs/accessing-cpanel).

3. In the FILES section of the cPanel home screen, click File Manager:\
   ![](https://static.hosting.com/kb/kb_wp_cpanel_filemanager.png)

4. In the left sidebar, click the name of the directory that you want to open. The directory's contents appear in the right pane.

5. Locate the wp-config file in the WordPress installation directory:\
   ![](https://static.hosting.com/kb/kb_wp_wpconfig.png)

6. Open the wp-config.php file in your preferred IDE or text editor.

7. Add the following lines at the end of the file:

```
define( 'WP_DEBUG', true );

define( 'WP_DEBUG_LOG', true );
```

![](https://static.hosting.com/kb/kb_wp_enabledebuging_script.png)

8. Save the changes. WordPress will now log all errors in the wp-content folder in a file called debug.log. Keep in mind that debug mode will not prevent the dreaded white screen of death, but it will assist you in identifying the offending plugin or theme.

## More information

For more information about error logging and file manager, please visit:

* [Enabling PHP error logging](/docs/php-error-log)
* [Getting started with cPanel File Manager](/docs/getting-started-with-file-manager)

## Related articles

* [Error Log](/docs/error-log)
