HostingWordPressSpanish version

Support article

How to enable debug mode in WordPress

Debug mode in WordPress is an essential tool for developers and website administrators. It lets you identify and fix...

Published: 30/06/2026Updated: 30/06/2026

Debug mode in WordPress is an essential tool for developers and website administrators. It lets you identify and fix problems on your site, such as code errors, plugin or theme conflicts, and much more. In this article, I’ll guide you through the steps to enable debug mode in WordPress.

What is Debug Mode in WordPress?

Debug mode, also known as debugging mode, is a WordPress feature that displays detailed error messages instead of hiding them. These messages help you identify problems on your website and provide useful information to fix them.

Steps to Enable Debug Mode:

  1. Access your WordPress website: Log in to the WordPress administration panel.
  2. Open the wp-config.php file: The next step is to access your website’s wp-config.php file. You can do this through an FTP client or by using your hosting’s file manager.
  3. Edit the wp-config.php file: Once you’ve located the wp-config.php file, edit it with a text editor or code editor. Look for the line that contains the following statement:

define(‘WP_DEBUG’, false);

4. Change the value to true: Modify the line above so it looks like this:

define(‘WP_DEBUG’, true);

This will enable debug mode in WordPress.

5. Define a directory for the logs (optional): You can specify a directory where debug logs will be saved. To do so, add the following line right below the line you just modified:

define(‘WP_DEBUG_LOG’, true); define(‘WP_DEBUG_LOG’, ‘/path/to/logs/directory/’);

Make sure to replace /path/to/logs/directory/ with the desired location for your log files.

6. Display errors on screen (optional): If you also want errors to be displayed on screen, add the following line:

define(‘WP_DEBUG_DISPLAY’, true);

7. Save the changes: Save the wp-config.php file after making all the modifications.

8. Verify debug mode: Now that you’ve enabled debug mode, visit your website. You’ll see detailed error messages if there’s any problem. These messages will give you clues about where and how to fix the issues.

9. Disable debug mode (optional): Once you’ve resolved the issues, it’s recommended to disable debug mode to prevent error messages from being shown publicly. To do so, simply go back to the wp-config.php file and change the line define('WP_DEBUG', true); back to define('WP_DEBUG', false);.