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:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

4. Save your changes and exit the text editor. Debugging mode is now active.

enable wordpress debugging mode steps


SCRIPT Debugging:

When SCRIPT_DEBUG is enabled, WordPress uses development versions of core CSS and JavaScript files instead of the compressed versions that it normally uses. By default, this setting is disabled. You can use this setting to test modifications to built-in .js or .css files. To enable this setting, add the following line to the wp-config.php file:

define('SCRIPT_DEBUG', true);



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:

define('SAVEQUERIES', true);


If you liked this article, then please subscribe or follow us. You can also find us on Facebook , Google Plus and Twitter or Download our APP.

Like us !