Checking your WordPress site error log helps you quickly identify and fix issues like plugin conflicts, theme problems, or server errors by viewing PHP warnings, fatal errors, and debug messages directly from your server. To do this, you need access to your site’s files via FTP, SFTP, or your hosting control panel’s file manager, and optionally, the ability to edit the wp-config.php file to enable debugging if it’s not already active.

What You'll Need

  • Access to your hosting account (cPanel, Plesk, or similar)
  • FTP/SFTP credentials or file manager access
  • A text editor (like Notepad++, VS Code, or even your hosting panel’s built-in editor)
  • (Optional) SSH access if you prefer command-line tools

Step-by-Step

  1. Log in to your hosting provider’s control panel (such as cPanel, Plesk, or a custom dashboard) and navigate to the File Manager section.
  2. Locate the root directory of your WordPress installation—this is typically the folder containing wp-admin, wp-content, and wp-includes, often named public_html or your domain name.
  3. Inside the WordPress root, look for a file called debug.log. This file is usually inside the wp-content folder (so the full path is wp-content/debug.log). If you don’t see it, debugging may not be enabled yet.
  4. If debug.log is missing, you’ll need to enable WordPress debugging. Open the wp-config.php file in the root directory for editing.
  5. In wp-config.php, find the line that says define('WP_DEBUG', false); and change it to define('WP_DEBUG', true);.
  6. Directly below that line, add these two lines if they aren’t already present: define('WP_DEBUG_LOG', true); define('WP_DEBUG_DISPLAY', false);
  7. Save the changes to wp-config.php and close the file.
  8. Now, reproduce the issue you’re troubleshooting (e.g., visit the broken page, try to activate a plugin, or submit a form). This will trigger WordPress to write errors to the debug log.
  9. Return to the File Manager, navigate to wp-content/, and open or download the debug.log file to view its contents.
  10. Review the log entries: each line includes a timestamp, error type (like Warning, Notice, or Fatal error), the file path, and line number where the issue occurred. Use this info to identify the problematic plugin, theme, or code.
  11. Once you’ve fixed the issue, return to wp-config.php and set WP_DEBUG back to false to stop logging and prevent exposing sensitive information on live sites.

Common Mistakes

  • Leaving WP_DEBUG set to true on a live site, which can expose error details to visitors and pose a security risk.
  • Forgetting to set WP_DEBUG_DISPLAY to false, causing errors to appear directly on your site’s frontend, which can confuse users and leak information.
  • Not clearing the debug.log file periodically, leading to excessively large files that are hard to read and consume disk space.
  • Looking for errors in the wrong place—some hosts store logs outside the WordPress directory (e.g., in /logs), so check your hosting documentation if wp-content/debug.log is empty.
  • Assuming a blank debug.log means no errors—sometimes logging fails due to file permissions; ensure wp-content/ has write permissions (typically 755 or 775).

Tips

  • Use a code-aware text editor (like VS Code or Sublime Text) to open debug.log—it makes reading timestamps and file paths easier with syntax highlighting.
  • If you have SSH access, run tail -f wp-content/debug.log to view new errors in real time as you test your site.
  • After fixing an issue, delete old entries from debug.log or truncate the file to keep it manageable.
  • For multisite installations, debug logs are still written to wp-content/debug.log unless customized via advanced configuration.
  • Some security plugins or hosting providers may restrict file access—if you can’t edit wp-config.php, contact support to confirm if debugging is allowed or if logs are available via their dashboard.

Troubleshooting

If you follow the steps above but still don’t see errors in debug.log, try these checks in order:

  1. Verify that WP_DEBUG, WP_DEBUG_LOG, and WP_DEBUG_DISPLAY are set correctly in wp-config.php—typos in the constant names (like WP_DEBUG_LOGGED) will prevent logging from working.
  2. Check file permissions: the wp-content folder must be writable by the web server (usually user www-data, apache, or nginx). Use chmod 755 on wp-content and 644 on debug.log if needed, but avoid 777 in shared environments.
  3. Confirm that your hosting provider allows PHP error logging—some budget or managed hosts override WordPress settings; check their knowledge base or contact support.
  4. Look for alternative log locations: some systems log PHP errors to files like error_log in the site root or via the hosting control panel’s “Logs” or “Metrics” section.
  5. Ensure you’re actually triggering the error—visit the problematic page in an incognito browser window to avoid caching, and make sure you’re not logged in as an admin if the issue only affects front-end users.
  6. If all else fails, temporarily rename your plugins folder (via FTP) to plugins-deactivate to force a plugin conflict test, then reactivate one by one while monitoring debug.log.

Frequently Asked Questions

Can I view the error log without FTP access?

Yes, if your hosting control panel includes a file manager (like in cPanel or Plesk), you can navigate to wp-content/ and view or download debug.log directly from the browser-based interface.

Is it safe to leave debugging enabled on a live site?

No—leaving WP_DEBUG true risks exposing sensitive data like database credentials or file paths to visitors. Always disable it after troubleshooting on production sites.

Why is my debug.log file empty even after enabling debugging?

This usually means either the error isn’t being triggered, file permissions prevent writing to wp-content/, or your host overrides WordPress logging settings. Check permissions and test the issue again.

Can I debug JavaScript or CSS issues this way?

No—this method only logs PHP errors. For frontend issues, use browser developer tools (Console tab) to check JavaScript errors or inspect CSS problems.

How often should I check the error log?

Check it whenever you notice site issues—after updates, plugin installations, or when users report problems. Regular checks aren’t needed if the site is stable.

}