WordPress debugging logs PHP errors, warnings, and notices to a file so you can identify what’s causing issues on your site. When troubleshooting WP Ghost or any other plugin, enabling debug logging is the first step support teams will ask for. The debug log captures errors without displaying them to visitors, giving you (and support) the information needed to diagnose problems. This guide covers how to enable debugging, read the log, and disable it when you’re done.
When to Enable Debugging

Enable debugging when something isn’t working as expected: a page shows a blank screen (white screen of death), a plugin feature doesn’t activate properly, WP Ghost settings aren’t applying, or you’re seeing unexpected behavior after a plugin or theme update. Debugging captures the PHP errors behind these issues. When contacting WP Ghost support, including the relevant lines from your debug log speeds up diagnosis significantly.
Enable WordPress Debugging
- Access your site’s root directory via FTP, cPanel File Manager, or SSH.
- Open the
wp-config.phpfile. - Find the line
/* That's all, stop editing! Happy publishing. */. Add the following code above that line:
// Enable WP_DEBUG mode
define('WP_DEBUG', true);
// Log errors to /wp-content/debug.log
define('WP_DEBUG_LOG', true);
// Don't display errors on the frontend
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
// Use non-minified core JS and CSS (optional, for dev only)
define('SCRIPT_DEBUG', true);
- Save the file.
What each constant does:
WP_DEBUG– Enables debugging mode. PHP errors, warnings, and notices are captured.WP_DEBUG_LOG– Writes errors to/wp-content/debug.loginstead of only displaying them.WP_DEBUG_DISPLAY– Set tofalseto prevent errors from showing on the frontend. Visitors won’t see PHP error messages.SCRIPT_DEBUG– Forces WordPress to load non-minified JS and CSS files. Only needed if you’re debugging JavaScript or CSS issues. You can skip this constant for most troubleshooting.
Review the Debug Log
- Open the
debug.logfile in a text editor.

When contacting WP Ghost support, copy the relevant error lines from the debug log and include them in your support request. This helps the team diagnose the issue faster.
Disable debugging when you’re done. Leave debugging enabled only while actively troubleshooting. The debug.log file grows continuously and can become very large on active sites. It may also contain sensitive information like file paths and database queries. When finished, set WP_DEBUG to false (or remove the debugging constants) and delete the debug.log file.
WP Ghost can hide the debug.log file. While debugging is active, the debug.log file is publicly accessible at yourdomain.com/wp-content/debug.log. WP Ghost hides this file when you enable Hide WordPress Common Files at WP Ghost > Change Paths > WP Core Security, preventing external access to your error log.
Frequently Asked Questions
Does WP Ghost have its own debugging feature?
WP Ghost includes a Security Check that identifies configuration issues, and the premium version includes a Security Threats Log for monitoring attacks. For PHP-level errors and plugin conflicts, WordPress’s built-in debug logging (covered in this guide) is the standard tool. WP Ghost support may ask for your debug log when troubleshooting issues.
The debug.log file shows wp-content paths. Does this expose my site?
If WP Ghost has changed your wp-content path, the debug log still references the original directory name because PHP errors use the real file system paths, not the URL paths. This is normal. The debug log itself is the exposure risk, not the paths inside it. Use WP Ghost’s Hide Common Files feature to block external access to the log, and delete it when debugging is done.
I enabled debugging but there’s no debug.log file. Why?
The debug.log file is only created when WordPress encounters an error. If no errors occur, the file won’t exist. Also verify that WP_DEBUG_LOG is set to true and that the wp-content directory is writable by the web server (file permissions 755 for the directory).
Does WP Ghost modify WordPress core files?
No. Debugging constants are added to wp-config.php, which is your site’s configuration file. WP Ghost uses rewrite rules and hooks. Neither modifies core files.
Related Tutorials
Troubleshooting and recovery:
- Emergency Disable – Disable WP Ghost temporarily for troubleshooting.
- Safe URL Parameter – Bypass WP Ghost settings for testing.
- WP Ghost Constants Reference – All wp-config.php constants.
- Add Files to Hide Common Files – Hide debug.log from public access.