How To Check WordPress Error Logs?


WordPress error logs

Are you looking for ways to check your WordPress log and diagnose website issues? WordPress error logs are crucial in diagnosing or resolving website issues and most importantly maintaining your WordPress website.

In this guide, we’ll go through how to check WordPress logs and use them for diagnosis.

Table of Contents

What are WordPress Error logs?

If you are having issues on your website, WordPress error logs can help you pinpoint the root cause of the issue and fix it whether it be removing a line of code, deactivating your WordPress theme or removing the faulty plugin.

Error logs are records of activities and events that occur on your WordPress website. And, these logs provide detailed insights into user interactions, errors, security threats, and system performance. Read our activity logs article – What are WordPress activity logs?

Essentially, these logs are collected in a file with a timestamp and thread of what’s happening in the website. You can review these logs and find out what exactly is causing the issue.

Error logs capture information about errors encountered by your WordPress site, such as PHP errors, database connection errors, and plugin conflicts. You can then analyse the log file and find out the error.

Why do you need WordPress Error Logs?

WordPress logs record everything that’s happening in a website. This means you will be able to view insights into website activity, performance, and security. 

By understanding and effectively leveraging these logs, you can enhance website management, troubleshoot issues, and optimise performance as well. Here are some of the common errors that WordPress error logs can help with.

WordPress Debug Mode

WordPress Debug Mode is a feature that allows developers to track and log errors, warnings, and notices that occur within the WordPress site. When enabled, it provides detailed information about PHP errors, database queries, and other issues, making it easier to diagnose and resolve issues.

Enabling WordPress Debug Mode With wp-config.php

One of the simplest ways to enable WordPress Debug Mode is by editing the wp-config.php file located in the root directory of your WordPress installation. This is a crucial file on your website and it needs to be handled with caution. You can find the wp-admin file connecting your website via the FTP client or through the File Manager from your CPanel. Download the and edit the file with a text editor.

Find this line of code define(‘WP_DEBUG’, false);  and replace it with the code below:

define( ‘WP_DEBUG’, true );

define( ‘WP_DEBUG_LOG’, true );

define( ‘WP_DEBUG_DISPLAY’, false );

@ini_set( ‘display_errors’, 0 );

Once you’ve made those changes, remember to hit the save button. That’ll switch on the “debug mode” for your site, and any errors will be stored in a debug.log file in your /wp-content/ folder.

Enabling WordPress Debug Mode With a Plugin

Debug Log Manager WordPress Plugin for WordPress error logging

Another way to enable debug mode is by installing a debugging plugin. This is an easier method, but this is only applicable if you are able to access the WP-admin dashboard which is not the case in most WordPress errors.

To enable WordPress debug mode with plugins, simply install the plugin and activate the plugin.

WP Debugging plugin for WordPress error log

How to Disable Debug Mode?

To disable Debug Mode, simply revert the changes in the wp-config.php file made earlier. Or you can also comment out the line define( ‘WP_DEBUG’, true ). 

image 3

If you enabled the debug mode using the plugin, the plugin should have an option to disable it. 

Where to Find WordPress Error logs?

After enabling the debugging mode, any error messages will be logged in the WordPress error logs. You will need to recreate the errors in the website in order for it to be logged in the error log file.

WordPress error logs can be located varying on your hosting environment. For most cases, you can find the debug.log file in your /wp-content/ folder in your file manager or you can also access this via FTP client. Within this directory, you’ll typically find a file named debug.log or error_log, which contains the relevant error information. Some of the hosting providers may also provide a folder named Logs where all types of logs including access log and activity log files are stored.   

Common WordPress Errors

White Screen of Death

The White Screen of Death is a common WordPress error characterised by a blank white screen, making it impossible to access your website. Debug Mode helps identify and display PHP errors such as syntax errors, undefined variables, or deprecated function usage, enabling developers to fix them efficiently. Debug Mode can uncover conflicts between themes and plugins, allowing developers to isolate and resolve compatibility issues that may affect website functionality. 

This error is often caused by incompatible plugins or custom WordPress themes, PHP errors, or insufficient memory limit. To resolve this issue, you can try the following steps:

  • Deactivate recently installed plugins or themes.
  • Increase PHP memory limit in wp-config.php file.
  • Enable debugging mode to identify the specific cause of the error.

Internal Server Error (HTTP 500)

The Internal Server Error is another common WordPress error that occurs when something goes wrong on the server-side, preventing the website from loading. This error can be caused by various factors, including corrupted .htaccess file, PHP memory limit exhaustion, or faulty plugins. To troubleshoot this issue, you can try these:

  • Rename or delete the .htaccess file to regenerate it.
  • Increase PHP memory limit in php.ini file.
  • Disable all plugins and re-enable them one by one to identify the culprit.

Debug Mode and error logs are the go-to WordPress tools in finding, resolving WordPress website errors as well as finding out whats happening on your website.

If you need help or assistance in managing your WordPress website, reach us out. We offer WordPress website care plans to help you maintain and manage your website. Book a free consultation now!


Updated on: 7 May 2024 |


Sazjan Neupane

Sazjan Neupane

Sazjan helps us reach our dream clients with his expertise in Search Engine Optimisation, PPC, Project Management & Online Business Development. He has worked with a variety of clients in different industries over the last 5 years. In his free time, Sazjan enjoys traveling and exploring new cultures.