How to Debug WordPress Using WP_DEBUG
When WordPress isn't behaving as expected, enabling WP_DEBUG is the first step to finding out why. Debug mode activates PHP error reporting and can reveal exactly which file or function is causing a problem. Here's how to use it on your dotCanada hosting account.
Enabling WP_DEBUG
Connect to your site via FTP and open wp-config.php from the site root. Find the line that says define('WP_DEBUG', false); and update it - or add these lines before /* That's all, stop editing! */:
define('WP_DEBUG', true);- enables debug modedefine('WP_DEBUG_LOG', true);- writes errors to/wp-content/debug.logdefine('WP_DEBUG_DISPLAY', false);- hides errors from visitors (recommended for live sites)
Reading the Debug Log
With WP_DEBUG_LOG enabled, all PHP errors and warnings will be written to /wp-content/debug.log. You can view this file via FTP or through the File Manager in cPanel. Look for the most recent entries - they'll include the file path, line number, and error description.
Turning Off Debug Mode
Once you've resolved your issue, set WP_DEBUG back to false and remove or disable the log. Leaving debug mode on for live sites can expose sensitive information to visitors.
If the debug log reveals errors you're not sure how to fix, contact our support team - we're happy to take a look.
100% Satisfaction Guarantee
We're so confident you'll love dotCanada that we offer a 30-day money-back guarantee. Not satisfied? Get a full refund, no questions asked.
Ready to Get Started?
Join thousands of Canadian website owners who trust dotCanada for reliable, fast web hosting.
Get Started Today
