WP debug mode helps you identify issues inside your WordPress site by showing hidden errors, warnings, and PHP notices. Whether a plugin misbehaves, a theme update breaks your layout, or something suddenly stops loading. Enabling WP debug mode makes troubleshooting much easier.
In this guide, you will learn two ways to enable debugging with a plugin and without a plugin along with best practices and log file access.
What is WP Debug Mode and Why It’s Useful?
WP debug mode tells WordPress to stop hiding errors and instead show or store them. It is helpful when:
- Your site shows a white screen.
- Plugins or themes conflict.
- You encounter the message: “There has been a critical error.”
- You need a clean error log for support teams.
- Page load speed drops suddenly.
When debug mode is active, WordPress logs every warning, so you know exactly what needs to be fixed.
How to Enable Wordpress Debug Mode
Method 1: Enable WP Debug Mode Without a Plugin (Using wp-config.php)
1: Open wp-config.php
- Open your WordPress root folder (public_html).
- Access it using:
- cPanel File Manager
- FTP/SFTP
- SSH (advanced users)
- Find and open the wp-config.php file.

2: Turn On Debug Mode
- Find this line:
define(‘WP_DEBUG’, false);
- Replace it with:
define(‘WP_DEBUG’, true);
3: Enable Debug Logging (Recommended for Live Sites)
- Add these lines above:
/* That’s all, stop editing! Happy publishing. */ - Add:
define(‘WP_DEBUG’, true);
define(‘WP_DEBUG_LOG’, true);
define(‘WP_DEBUG_DISPLAY’, false);
- Error logs will be stored in:
/wp-content/debug.log
Method 2: Enable WP Debug Mode Using a Plugin (WP Debugging Plugin)
1: Install the WordPress Debug Plugin
- Log in to your WordPress admin.

- Go to Plugins >> Add New.

- Search for WP Debugging.
- Install and activate the plugin.

- The plugin automatically updates your wp-config.php safely.
2: Enable Debugging
- After activation, the plugin automatically sets:
WP_DEBUG = true
WP_DEBUG_LOG = true
WP_DEBUG_DISPLAY = false - No manual file editing is required.
3: Check the Debug Logs
- Log file location:
wp-content/debug.log - You can view it through:
- cPanel File Manager
- FTP
- Log viewer plugin (optional)
4: Disable Debug Mode
- Go to Tools >> WP Debugging.

- Turn off the debugging options.

- Deactivate and delete the plugin if not needed.
- This safely resets the debug settings.
When to Choose Plugin vs Manual Method
|
Scenario |
Best Method |
| You’re new to WordPress |
Plugin |
| You want complete control over debugging |
Manual method |
| You’re troubleshooting a broken site (wp-admin not loading) |
Manual method |
| You want quick logs without editing files |
Plugin |
| Hosting panel blocks direct file editing |
Plugin |
How to Disable WP Debug Mode After Troubleshooting
Whether you enable it manually or via plugin, always turn it off later.
If you used wp-config.php:
define(‘WP_DEBUG’, false);
define(‘WP_DEBUG_DISPLAY’, false);
define(‘WP_DEBUG_LOG’, false);
If you used WP Debugging plugin:
- Go to Tools >> WP Debugging
- Uncheck all options
- Deactivate or delete plugin
Recommended Reference Links
Best Practices
- Don’t keep debug mode active permanently.
- Avoid displaying errors on live websites.
- Always maintain a backup before editing wp-config.php.
- Additionally, Use debug logs instead of showing errors to visitors.
- Share your debug.log with bodHOST support for faster troubleshooting.
Conclusion
WP debug mode is one of the simplest and most effective tools for troubleshooting WordPress errors. Additionally, you can use either the WordPress Debugging plugin or the manual wp-config method to identify the root cause of issues. Likewise, when you enable debug mode responsibly and follow best practices, you can resolve problems quickly and keep your website safe.
If you are using Bodhost, our team is always available to check your debug logs and help you fix any errors.
You can also, check out the latest guide on: How to Access and Monitor WordPress Error Logs