Skip to main content

How to enable and use WP_DEBUG

Learn what WP_DEBUG does, how to turn it on from the dashboard, and how to use it to find the cause of site errors.

Overview

When a WordPress site shows a critical error, a blank page, or a feature that suddenly stops working, the cause is usually hidden from view. WP_DEBUG is WordPress’s built-in debug mode, and it shows the PHP errors, warnings, and notices behind the problem, including which plugin, theme, or file triggered them. On Levamo, you can turn it on for any site from the dashboard without editing files or installing a plugin.

While WP_DEBUG is active, error messages appear publicly on your site’s pages, and site performance is reduced. Turn it on only while you’re troubleshooting, and turn it off as soon as you’re done.

In this article, you will find what WP_DEBUG does, step-by-step instructions for turning it on and off, and how to read its output to find the source of an issue.


What WP_DEBUG does

By default, WordPress hides PHP errors from your site’s pages. That keeps your site clean for visitors, but it also makes problems harder to diagnose. When WP_DEBUG is active, WordPress shows every PHP error, warning, and notice directly on the page where it happens.

This is useful when:

  • Your site shows a critical error or blank page: WP_DEBUG reveals the error that caused it

  • Something stopped working after an update: It shows whether a plugin, theme, WordPress, or PHP version change is responsible

  • You’re working with a developer: The exact error message gives them what they need to find a fix quickly

Tip:

If you have a staging site, reproduce the issue there and turn WP_DEBUG on for staging instead. This lets you troubleshoot without showing errors or slowing down your live site.


How to turn on WP_DEBUG

Step 1: Open your site

Sign in to the Levamo dashboard, click Sites in the main menu, and click Manage site next to the site you want to troubleshoot.

Step 2: Open the WordPress section

Click WordPress in the left-hand menu. The WP_DEBUG card shows whether debug mode is currently Active or Inactive.

Step 3: Activate WP_DEBUG

On the WP_DEBUG card, click Activate. A confirmation window explains that errors will be shown publicly and site performance will be reduced. Click Confirm to proceed.

The status changes to Active.

Step 4: Turn it off when you’re done

Once you’ve found the cause of the issue, return to the WP_DEBUG card and click Deactivate. The status changes back to Inactive.

Important:

Don’t leave WP_DEBUG active on a live site. Error messages can reveal file paths and other details about your site to visitors, and debug mode slows your site down.


How to use WP_DEBUG to find an issue

With WP_DEBUG active, visit the page where the problem happens, or repeat the action that triggers it, such as submitting a form or loading WordPress admin. Error messages appear at the top of the page or in place of the content that failed to load.

Read the message type

Each message starts with a label that tells you how serious it is:

  • Fatal error: Something broke badly enough to stop the page from loading. This is almost always the cause of a critical error or blank page.

  • Warning: Something went wrong, but the page continued to load. Warnings can explain features that behave unexpectedly.

  • Notice: A minor issue that usually doesn’t affect your site

  • Deprecated: The code uses a feature that PHP or WordPress plans to remove. These are common after a PHP upgrade and are a sign the code needs updating.

Focus on fatal errors first, then warnings. Notices and deprecation messages rarely cause visible problems.

Find the source

Each message includes the file path where the error happened. The path tells you which plugin or theme is responsible. For example:

Fatal error: Uncaught Error: Call to undefined function example_function() in /wp-content/plugins/example-plugin/includes/functions.php:42

In this example, /wp-content/plugins/example-plugin/ shows the error comes from a plugin called “example-plugin.” A path containing /wp-content/themes/ points to a theme instead.

Fix the issue

Once you know the source, you can:

  • Update it: Check whether a newer version of the plugin or theme is available

  • Deactivate it: Turn off the plugin temporarily to confirm it’s the cause

  • Contact the developer: Share the full error message with the plugin or theme’s developer, since they’re best placed to fix their code

If the issue started after a PHP version change, see How to change the PHP version of an environment for how to roll back while you resolve it.


FAQ

Will visitors see the error messages?

Yes. While WP_DEBUG is active, error messages appear publicly on your site’s pages. Use a staging site where possible, and turn WP_DEBUG off as soon as you’re done.

Does WP_DEBUG affect my site’s performance?

Yes. Debug mode reduces site performance while it’s active, which is another reason to turn it off as soon as you’ve identified the problem.

How do I check whether WP_DEBUG is on?

Open your site in the dashboard and click WordPress. The WP_DEBUG card shows its current status as Active or Inactive.

I turned on WP_DEBUG but don’t see any errors. What does that mean?

Make sure you’ve visited the affected page or repeated the action that causes the problem, since errors only appear when the code runs. If you still see nothing, the issue may not be caused by PHP. It could come from caching, JavaScript, or a server-level problem. Try clearing your site’s cache, and contact our support team if the issue continues.

Do I need to edit wp-config.php or install a plugin?

No. The dashboard handles WP_DEBUG for you. If you’ve previously added WP_DEBUG settings to wp-config.php yourself, check with our support team before using the dashboard option, so the two don’t conflict.


Conclusion

WP_DEBUG is the quickest way to see what’s actually breaking your site. Turn it on, reproduce the issue, use the file path to identify the plugin or theme responsible, and turn it off when you’re done. If you need help interpreting an error, our support team is available 24/7.

Did this answer your question?