Saturday, August 15, 2026
Home FEATURED Debugging mode in WordPress - What and How?

Debugging mode in WordPress – What and How?

Introduction

Debugging mode in WordPress is a feature that allows developers to troubleshoot and fix errors or issues on their WordPress website. When debugging mode is turned on, WordPress will display error messages, warnings, and notices on the front end of the website, making it easier to identify and fix problems.

It’s important to note that when debugging mode is turned on, it can expose sensitive information about your website and server, so it should only be used during development and testing. Once you have resolved the issues and your site is live, debugging mode should be turned off.

When debugging mode is turned on, WordPress will save debugging information to a log file (debug.log) in the wp-content directory, this way developers can check what is causing the error.

Additionally, when debugging mode is on, WordPress will not use the caching system, this allows developers to see the changes they make in the website without clearing the cache every time.

How to turn Debugging Mode on in WordPress
To turn on debugging in WordPress, you can edit the wp-config.php file located in the root directory of your WordPress installation.

Add the following line of code at the top of the file, before the line that says “require_once(ABSPATH . ‘wp-settings.php’);”:

define( 'WP_DEBUG', true );

This will turn on debugging mode, and any errors or warnings will be displayed on the front end of your website.

You can also specify where the debugging should be saved by adding the following lines of code, after the line you just added:

define( 'WP_DEBUG_LOG', true );

define( 'WP_DEBUG_DISPLAY', false );

This will save the debugging information to a debug.log file in the wp-content directory and turn off the display error on front end.

Remember to remove these lines or set WP_DEBUG to false when you are done debugging and your site is live.

datasagarhttp://www.DataSagar.com
Sagar is multidisciplinary technologist, educator, and entrepreneur based in Nepal. As the founder of Illionso Technologies and Kashi Garden Resort, he operates at the intersection of web architecture, data intelligence, innovation, and digital transformation. From building digital solutions to scaling real-world concepts, his mission is to share knowledge alongside merge emerging as well as disruptive technologies with transformative offline experiences.
RELATED ARTICLES

Why Linux Won the Infrastructure War? Lessons from Linus Torvalds

In 1991, 21-year-old Linus Torvalds announced a "hobby" operating system. Today, Linux powers supercomputers, cloud servers, and Android. Explore his journey, the open-source economy, and the lessons for modern developers.

What Is Vibe Coding? A Complete Beginner’s Guide to Building Software and Web Pages With AI

A few years ago, building a website meant sitting down with a programming book, picking a language, and slowly working through syntax...

What is Answer Engine Optimization (AEO)? Getting Ready for AI Powered Search and Agentic Era Digital Marketing

Search is changing faster than it has in the last two decades. For years, businesses focused on ranking their websites on search...

Most Popular

Why Linux Won the Infrastructure War? Lessons from Linus Torvalds

In 1991, 21-year-old Linus Torvalds announced a "hobby" operating system. Today, Linux powers supercomputers, cloud servers, and Android. Explore his journey, the open-source economy, and the lessons for modern developers.

What Is Vibe Coding? A Complete Beginner’s Guide to Building Software and Web Pages With AI

A few years ago, building a website meant sitting down with a programming book, picking a language, and slowly working through syntax...

What is Answer Engine Optimization (AEO)? Getting Ready for AI Powered Search and Agentic Era Digital Marketing

Search is changing faster than it has in the last two decades. For years, businesses focused on ranking their websites on search...

The Plain Text Web: Why llms.txt Is Becoming the New Site Standard

The web built today is heavy. Between client-side JavaScript, cookie banners, tracker scripts, and responsive CSS grids, a typical webpage carries megabytes...