DEV Community

Cover image for How to Enable Debug mode in WordPress
Osman Forhad
Osman Forhad

Posted on • Updated on

How to Enable Debug mode in WordPress

To enable debugging on your WordPress site, please follow the steps below.

1) Locating the wp-config.php file

2) Editing the wp-config.php file
Once your site files are open, you’ll need to open wp-config.php for editing. This will be located in the root folder of your site.

The wp-config file contains site-specific configuration settings, such as database information and, potentially, settings added by your hosting provider. For debugging, you’ll need to find this line of code (will generally be near bottom of file):

define( 'WP_DEBUG', true );

3) Adding your debug code
Copy and paste this code snippet over the line of code mentioned in Step 2.

`// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );

// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );

// Use dev versions of core JS and CSS files (only needed if you are modifying these core files)
define( 'SCRIPT_DEBUG', true );`

OR Follow Like Bellow Screen Shot:
Enabling debug in WordPress
.
Thank you
Happy Coding
.
osman forhad
Full-Stack Developer💻 (Mobile App & Web App)
developer.osmanforhad@gmail.com

Top comments (0)