This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

Every 1 second delay costs up to 20% conversions. Learn how to fix it [Free • Mar 10–11]. Save My Spot→

How to Enable Debugging in WordPress in 2025 (Detailed Guide)

Updated on April 29, 2025

9 Min Read
wordpress debug

Ever encountered mysterious issues on your WordPress site where things just would not work how they should? Missing layouts, broken plugins, and unexplainable blank screens are more common than you think.

Instead of sitting there wondering what went wrong, you can take matters into your own hands. That is where WordPress debug mode becomes your secret weapon.

WordPress debug mode helps you detect and track down errors quickly, allowing you to keep your site running at its best without feeling lost or overwhelmed.

We will cover two easy methods that work across all WordPress sites and also explain how Cloudways users can enable it quickly through manual file access.

But first, let’s learn about what debug mode means on WordPress.

What is WordPress Debug Mode?

WordPress debug mode is a built-in feature that helps you spot problems happening behind the scenes. It reveals hidden PHP errors, warnings, and notices that normally stay invisible while you browse your website.

When debug mode is turned on, WordPress either shows the errors on your screen or writes them to a special file. Doing so helps you save time by clearly understanding what is causing trouble instead of guessing blindly.

Without debug mode, errors can quietly disrupt your site without you even realizing it. If you want your website to stay reliable and problem free, you must know how to activate debug mode on your WordPress site.

How to Enable WordPress Debug Mode (General Methods)

Let’s go through the general ways you can activate debug mode on any WordPress site.

You can either:

  • Manually edit a core file to switch on debugging
  • Use a WordPress plugin to handle it for you without touching any code

Both options work fine, but if you prefer not to touch server files, you might prefer the plugin method.

Easily Enable WordPress Debug Mode with Cloudways

Troubleshoot errors faster on your WordPress site using debug mode—backed by our managed cloud hosting. Try it free for 3 days (no credit card needed).

Method#1: Editing the wp-config.php File Manually

The WordPress wp config.php file is where WordPress stores important settings about your site. One of those settings is whether debug mode is active.

Here is how you can manually turn it on:

1. Connect to your website using an FTP client like FileZilla.

Connect FileZilla

2. Navigate to your WordPress root directory and find the public_html file.

open public_html

3. Find the file named wp-config.php and open/view it for editing.

open/view wp-config.php

4. Look for this line inside the file:

define('WP_DEBUG', false);

look fro wp_debug

5. Change the word false to true so that it looks like this:

define('WP_DEBUG', true);

change false to true

6. To take things a step further, add the following lines right after it to make sure error messages are logged properly without showing them on your live site:

define('WP_DEBUG_DISPLAY', false);
define('WP_DEBUG_LOG', true);

define WP_DEBUG_DISPLAY as false and WP_DEBUG_LOG as true

7. This will create a file called debug.log inside your wp-content folder where all errors will be safely stored.

8. Save these changes to activate debug mode on your WordPress website.

Note: Remember, once you are done troubleshooting, it is a good idea to turn debug mode off again to avoid leaving sensitive information visible.

Method#2: Using a WordPress Plugin

If editing files feels a bit too technical or you simply want a faster way, WordPress has you covered with plugins that make enabling debug mode very simple.

One of the most popular plugins for this purpose is WP Debugging. Here is how you can set it up:

1) Log in to your WordPress admin dashboard.

wordpress dashboard

2) Go to Plugins and select Add New.

add new plugin

3) Search for WP Debugging.

wp debugging

4) Click Install Now and then Activate the plugin.

activate wp debugging

5) Head over to Tools and select WP Debugging.

click tools

6) Check the box that says Set WP_DEBUG to true.

checkmark Set WP_DEBUG to true

7) You can also enable options like logging errors while keeping them hidden from visitors.

8) Save your changes.

That is all you need to do. The plugin handles everything behind the scenes, turning on the necessary settings inside your wp-config file without you having to touch any code.

Another handy option for more detailed troubleshooting is the Query Monitor plugin. It gives you detailed insights about database queries, PHP errors, and scripts running on your site.

Once installed, a new menu will appear on your WordPress admin bar, and all the important technical information will be neatly organized.

If you are a beginner, starting with WP Debugging is the safest and easiest option.

How to Enable WordPress Debug Mode on Cloudways

If your WordPress website is hosted on Cloudways, enabling debug mode is still very simple. While Cloudways does not offer a direct toggle switch anymore, accessing and editing your site files is extremely easy through their platform.

You can enable debug mode in just a few steps without needing any complicated setups. Here is how you can do it on Cloudways.

1) Log in to your Cloudways Platform. Not a Cloudways user? Sign up to take their 3-day free trial (no credit card required)

log in to Cloudways

2) Select your desired server.

select server

3) Access your SFTP credentials from the Server Management section under Master Credentials.

Access your SFTP credentials

4) The next steps are the same as discussed in the manual method above. Connect to your server using any SFTP client like FileZilla.

5) Navigate to your application’s public_html folder.

6) Open the wp-config.php file for editing.

7) Set WP_DEBUG to true, and add the following lines if they are missing:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);

8. Save the file, and you are ready to start logging errors safely inside the debug.log file in the wp-content directory. And that’s it.

WordPress Debug Mode Best Practices

While debug mode is an incredibly useful tool, there are a few good habits you should always follow to avoid unwanted problems.

1) Avoid Showing Errors to Visitors

When you activate debug mode, WordPress can either display errors directly on your site or quietly save them in a log file.

It is always safer to keep the errors hidden from visitors. Displaying errors can confuse your audience and make your website look less professional. Even worse, sometimes error messages can reveal sensitive information about your site’s structure.

Make sure you always set the WP_DEBUG_DISPLAY setting to false. This way, errors are only saved inside the debug.log file where you can review them safely.

2) Disable Debug Mode After Troubleshooting

Leaving debug mode running after you are finished troubleshooting is not a good idea. It can slow down your site and create unnecessary files.

Once you have spotted and fixed the issues, remember to turn debug mode off by setting WP_DEBUG back to false in your wp-config.php file, even if you accessed it through Cloudways.

Keeping a habit of switching off debug mode keeps your site light and fast.

3) Use a Staging Environment for Testing

When fixing problems or making changes involving debug mode, it is smart to work on a staging site instead of your live website.

A staging site is a copy of your real website where you can safely test anything without worrying about affecting your visitors.

If you are hosting with Cloudways, creating a staging environment is very simple using the platform’s tools.

  • Log in to the Cloudways Platform.
  • Click Applications and then click the vertical ellipsis to create a staging application.

create staging

This lets you debug safely and only push updates to your real site once everything works perfectly.

Other Helpful Tools for Debugging WordPress

Debug mode already gives you a strong head start when fixing problems. But if you want to catch issues even faster or dig a little deeper, WordPress offers a few more simple tricks you can use.

Let us look at a few other helpful tools you can activate with just a few small steps.

Debugging CSS and JavaScript with SCRIPT_DEBUG

Sometimes the issue is not the code behind your website but how it looks or behaves on the front end. If you are troubleshooting design issues or script problems, WordPress has a handy setting called SCRIPT_DEBUG.

When you enable it, WordPress loads the full versions of its core CSS and JavaScript files instead of the compressed ones. This makes it much easier to find the root of style or behavior issues.

To activate it, open your wp-config.php file and add this line:

define('SCRIPT_DEBUG', true);

add define('SCRIPT_DEBUG', true); to wp-config

After you fix the problem, remember to switch it back to false to make sure your website loads faster.

Debugging Database Issues with SAVEQUERIES

Some problems are hidden in your database rather than your themes or plugins. If you suspect database queries are slowing down your site or causing strange behavior, WordPress has a built-in feature to track them.

To turn on query logging, simply add this line to your wp-config.php file:

define('SAVEQUERIES', true);

add define('SAVEQUERIES', true); to wp-config

This setting keeps a record of every database query your site runs, including how long each one takes. You can view this information with tools like the Query Monitor plugin or with some custom coding if you prefer.

Since logging every query can slow your website down, it is best to use SAVEQUERIES only while actively troubleshooting.

Debug WordPress Like a Pro on Cloudways

Turn on debug mode in just a few steps and fix issues with ease, Cloudways makes WordPress troubleshooting smoother. Start your free 3-day trial (no credit card required).

Using the Query Monitor Plugin for Advanced Debugging

If you want to keep an even closer eye on everything happening behind the scenes, the Query Monitor plugin is one of the best tools you can add to your WordPress site.

Query Monitor can help you see:

  • Database queries and how fast they run
  • PHP errors and warnings
  • Hooks and actions running on each page
  • Scripts and styles that are loading
  • API calls happening in the background

Once you install and activate Query Monitor, a new option will appear in your WordPress admin bar.

Clicking it opens a detailed panel that shows everything you need to know to quickly spot slowdowns, broken queries, or missing scripts.

It is a free plugin and very beginner-friendly, even if you are not a developer.

Final Thoughts

WordPress debug mode puts you in control whenever your website faces unexpected issues. Whether you activate it manually through your wp-config.php file, use a simple plugin, or update it through your Cloudways file manager, you now know exactly how to turn it on and investigate problems with confidence.

Cloudways makes it simple to access your application files securely, so even manual changes like enabling debug mode can be done without any complicated steps. With the power of debug mode in your hands, you can fix small problems before they grow into bigger ones and keep your website running at its best.

With the power of debug mode in your hands, you can fix small problems before they turn into big headaches and keep your website running smoothly for your visitors.

Frequently Asked Questions

Q. How do I know if WordPress debug mode is enabled?

You can check your wp-config.php file inside your WordPress root directory. If you see define(‘WP_DEBUG’, true); written inside the file, then debug mode is active. If it says false, then debug mode is disabled.

Q. Where can I find the WordPress debug log?

Once debug mode is activated along with logging, a file called debug.log will be created inside your wp-content folder. You can open this file using your hosting file manager or an FTP client.

Q. Is it safe to leave debug mode turned on forever?

No, it is better to deactivate debug mode once you are done troubleshooting. Leaving it on can clutter your server with unnecessary logs and expose technical details that should stay hidden.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Sarim Javaid

Sarim Javaid is a Sr. Content Marketing Manager at Cloudways, where his role involves shaping compelling narratives and strategic content. Skilled at crafting cohesive stories from a flurry of ideas, Sarim's writing is driven by curiosity and a deep fascination with Google's evolving algorithms. Beyond the professional sphere, he's a music and art admirer and an overly-excited person.

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Want to Experience the Cloudways Platform in Its Full Glory?

Take a FREE guided tour of Cloudways and see for yourself how easily you can manage your server & apps on the leading cloud-hosting platform.

Start my tour