LIMITED OFFER ๐Ÿ”ฅ Special Promo โ€” Get up to 50% OFF all Web & Business Hosting plans with code HOST50. Claim discount โ†’
โ† Knowledge Base
WordPress4 min read

How to Enable WordPress Debug Mode Safely

When your WordPress site breaks โ€” a white screen, a plugin error, or an unexpected crash โ€” WordPress typically swallows the actual PHP error and shows you nothing. Debug mode forces WordPress to surface those hidden errors so you can fix them. Here is how to enable it safely on your Hostinap Shared or Business Hosting account without exposing error details to your site visitors.

Step 1: Open wp-config.php

  1. Log in to cPanel > File Manager.
  2. Navigate to your public_html directory.
  3. Find wp-config.php, right-click it, and choose Edit. Click Edit in the confirmation dialog.

Step 2: Add the Debug Constants

Locate the line that reads:

define( 'WP_DEBUG', false );

Replace it (or add these lines directly above the /* That's all, stop editing! */ comment) with:

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

Click Save Changes.

Step 3: Reproduce the Error and Check the Log

  1. Visit your website and reproduce whatever action was causing the error (load the page, submit the form, etc.).
  2. Go back to cPanel File Manager and navigate to public_html/wp-content/.
  3. Open the debug.log file. Scroll to the bottom to see the most recent errors.

You will see entries like:

[22-Aug-2026 02:30:00 UTC] PHP Fatal error: Call to undefined function
my_plugin_function() in /home/user/public_html/wp-content/plugins/my-plugin/my-plugin.php on line 47

This tells you the exact plugin file and line number that is broken.

Common Error Types and What They Mean

Step 4: Disable Debug Mode When Done

Once you have identified and fixed the issue, immediately return to wp-config.php and set all debug constants back:

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

Also delete the debug.log file from wp-content/ โ€” it can grow very large and contains sensitive path information.

Need Immediate Help?

Share your debug.log output with our team on WhatsApp and we will diagnose the root cause for you โ€” no need to interpret cryptic PHP errors yourself.

View hosting plans
Registered LLPHostinap Software Solutions
cPanel PartnerLicensed control panel
LiteSpeedLicensed web server
Since 201510+ years hosting