Skip to content

How to Check WordPress Error Logs

WordPress error logs help you identify and fix site issues quickly. This guide shows you multiple ways to access and read error logs, including built-in tools, hosting dashboards, and plugins—so you can keep your site running smoothly.

Key Takeaways

  • Enable debugging in WordPress: Use wp-config.php to turn on WP_DEBUG and log errors for troubleshooting.
  • Access logs via hosting control panel: Most hosts like cPanel or Plesk store error logs in easy-to-find directories.
  • Use FTP or file manager: Navigate to wp-content/debug.log or server error_log files manually.
  • Install a logging plugin: Tools like WP Debugging or Query Monitor simplify error tracking without coding.
  • Check browser console for frontend issues: JavaScript and CSS errors often appear in browser developer tools.
  • Regular monitoring prevents downtime: Review logs weekly to catch problems before they affect visitors.
  • Disable debug mode in production: Always turn off WP_DEBUG after fixing issues to avoid exposing sensitive data.

How to Check WordPress Error Logs: A Complete Guide

Is your WordPress site showing a white screen, throwing 404 errors, or behaving oddly? Chances are, there’s an error hiding under the surface—and the best place to find it is in your WordPress error logs. These logs record everything from PHP warnings to fatal crashes, giving you the clues needed to fix problems fast.

In this guide, you’ll learn how to check WordPress error logs using five reliable methods: enabling built-in debugging, accessing logs through your hosting provider, using FTP, installing helpful plugins, and checking browser consoles. Whether you’re a beginner or a seasoned developer, these steps will help you diagnose and resolve issues with confidence.

Method 1: Enable WordPress Debug Mode

The easiest way to start logging errors is by turning on WordPress’s built-in debug mode. This feature writes all PHP errors, notices, and warnings to a file called debug.log inside your wp-content folder.

Step 1: Access Your wp-config.php File

You’ll need to edit your site’s wp-config.php file. This file is located in the root directory of your WordPress installation. You can reach it via:

  • Your hosting control panel’s file manager (like cPanel)
  • An FTP client (such as FileZilla)
  • SSH (if you have terminal access)

Step 2: Add Debugging Constants

Open wp-config.php in a text editor and look for the line that says /* That's all, stop editing! Happy publishing. */. Just above that line, add the following code:

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

Here’s what each line does:

  • WP_DEBUG: Turns on debugging mode.
  • WP_DEBUG_LOG: Saves errors to wp-content/debug.log.
  • WP_DEBUG_DISPLAY: Prevents errors from showing on your live site (keeps things clean for visitors).

Step 3: Save and Test

Save the file and upload it back to your server if you edited it locally. Now, visit your site and trigger the issue (e.g., load a broken page). Then, check the wp-content folder for a new file named debug.log. Open it to see detailed error messages.

Pro Tip: Always disable debug mode once you’ve fixed the issue by setting WP_DEBUG to false. Leaving it on can expose sensitive information to hackers.

Method 2: Check Error Logs via Your Hosting Provider

Most web hosts automatically generate server-level error logs. These logs capture issues that happen before WordPress even loads—like database connection failures or memory limits.

How to Check WordPress Error Logs

Visual guide about How to Check WordPress Error Logs

Image source: codeless.co

Step 1: Log Into Your Hosting Dashboard

Go to your hosting provider’s control panel. Popular options include:

  • cPanel (used by Bluehost, HostGator, etc.)
  • Plesk
  • SiteGround’s custom dashboard
  • Cloudways or RunCloud for managed hosting

Step 2: Locate the Error Logs Section

In cPanel, look for a section called “Metrics” or “Logs”. Click on “Error Logs”. You’ll usually see a list of recent errors with timestamps and file paths.

On SiteGround, go to Site Tools > Logs > Error Logs. Many hosts also let you download full log files or view them in real time.

Step 3: Filter and Analyze

Look for entries containing phrases like PHP Fatal error, PHP Warning, or MySQL server has gone away. These indicate serious issues. For example:

[Wed Oct 05 10:23:45 2023] [error] [client 192.168.1.1] PHP Fatal error: Allowed memory size exhausted in /home/user/public_html/wp-includes/plugin.php on line 123

This tells you a plugin is using too much memory—time to deactivate it or increase your PHP memory limit.

Method 3: Use FTP or File Manager to Find Log Files

If your host doesn’t provide a logs interface, you can manually search for log files using FTP or your hosting file manager.

Step 1: Connect to Your Server

Use an FTP client like FileZilla or your host’s built-in file manager. Navigate to your WordPress root directory (usually public_html or www).

Step 2: Look for Common Log File Names

Check these locations:

  • /wp-content/debug.log (if WP_DEBUG is enabled)
  • /error_log (a common server log file in the root or wp-content folder)
  • /logs/error.log (some hosts store logs in a separate folder)

Right-click the file and choose “View” or “Edit” to read its contents. If the file is large, download it and open it in a text editor like Notepad++.

Step 3: Search for Keywords

Use Ctrl+F (or Cmd+F on Mac) to search for:

  • Fatal error
  • Warning
  • Notice
  • Deprecated

These keywords help you spot the most critical issues quickly.

Method 4: Use a WordPress Error Logging Plugin

Don’t want to touch code? Plugins make error logging simple and user-friendly. They often include dashboards, email alerts, and filtering options.

Recommended Plugins

  • WP Debugging: Lightweight and integrates with WordPress’s native debug system.
  • Query Monitor: Great for developers—shows database queries, hooks, and PHP errors in the admin bar.
  • Error Log Monitor: Displays server error logs directly in your WordPress dashboard.

How to Install and Use WP Debugging

  1. Go to Plugins > Add New in your WordPress admin.
  2. Search for “WP Debugging” and install it.
  3. Activate the plugin.
  4. Visit Tools > WP Debugging to see real-time error reports.

These plugins often auto-enable WP_DEBUG and create log files for you—no manual coding required!

Method 5: Check Browser Developer Tools for Frontend Errors

Not all errors come from PHP. JavaScript, CSS, or missing assets can break your site’s appearance or functionality. Use your browser’s developer tools to catch these.

Step 1: Open Developer Tools

In Chrome, Firefox, or Edge, right-click anywhere on your site and select “Inspect”. Or press F12 or Ctrl+Shift+I.

Step 2: Go to the Console Tab

The Console tab shows JavaScript errors, failed resource loads, and CORS issues. For example:

Failed to load resource: net::ERR_CONNECTION_REFUSED
Uncaught TypeError: Cannot read property 'value' of null

These hints point to missing files or broken scripts—often caused by plugin conflicts or theme updates.

Step 3: Check the Network Tab

The Network tab reveals which files failed to load (shown in red). Look for 404 or 500 status codes next to CSS, JS, or image files.

Tip: Clear your browser cache before testing—sometimes old files cause false errors.

Troubleshooting Common Issues

No debug.log file appears? Make sure WP_DEBUG_LOG is set to true and your wp-content folder is writable (permissions should be 755 or 775).

Logs show “memory exhausted” errors? Increase your PHP memory limit by adding this to wp-config.php:

define( 'WP_MEMORY_LIMIT', '256M' );

Seeing 404 errors in logs? This might mean permalinks are broken. Go to Settings > Permalinks and click “Save Changes” to refresh rewrite rules. For more on handling 404s, check out our guide on 404 Error In WordPress.

Plugin or theme causing crashes? Temporarily switch to a default theme like Twenty Twenty-Four. If the error disappears, your theme is the culprit. Learn how to safely deactivate a theme in WordPress or delete unused themes to keep your site clean.

Conclusion

Checking WordPress error logs doesn’t have to be scary. With the right tools and a little know-how, you can quickly find and fix almost any issue—from plugin conflicts to server crashes. Whether you use built-in debugging, your host’s dashboard, or a handy plugin, staying on top of errors keeps your site fast, secure, and reliable.

Remember: always disable debug mode after troubleshooting, monitor logs regularly, and keep your themes and plugins updated. A healthy WordPress site starts with proactive error management.