DEV Community

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

Posted on • Edited on

1

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

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay