Enable WordPress Debugging Mode
Many settings in WordPress that you can use to help debug the main application, themes, your own custom code, and more. Generally, these settings are intended for use by developers and should not be used on “live” sites. However, you can also use them to troubleshoot issues you may be experiencing with third-party code, such as plugins or themes.
To enable wordpress debugging mode:
1. Log in to cPanel.
2. Using the cPanel File Manager, open the wp-config.php file from public_html or www folder in your preferred text editor.
3. To enable debugging mode, add the following line to the wp-config.php file:
4. Save your changes and exit the text editor. Debugging mode is now active.
Logging databsae Queries:
If you are experiencing issues in database of your WordPress, you can enable query logging. When query logging is enabled, the following items are saved in the global $wpdb->queries array:
1. The actual database query.
2. How long the query takes to run.
3. The function that called the query.
To enable database query logging, add the following line to the wp-config.php file: