How to Find Your WordPress Error Logs

Error logs are one of the most useful tools for anyone running a WordPress. Your site’s error log will record all the error messages generated by WordPress.

These logs are a goldmine of information. Developers find error logs really helpful when they need to diagnose and troubleshoot issues with a WordPress website.

An error log typically contains information about PHP errors, database connection issues, plugin conflicts, and other problems that may arise when running a WordPress site. This screenshot below shows a typical error logs provided by a hosting company:

Error logs are one the key features here at Logtivity. Our approach is a little more organized. Rather than that dump all the errors into one large file, the Logtivity dashboard allows you to search and filter all the errors.

What’s in your PHP Error Logs?

PHP error logs normally contain a wide range of errors from irrelevant to serious.

An “error” is any kind of issues or problems that occur while executing a PHP script. These errors can range from simple syntax errors to more complex issues such as a missing library or an unexpected value.

PHP errors can be generally be divided into three categories:

  1. Notices: These are non-critical errors that do not prevent the script from executing, but they indicate that something might be wrong. For example, accessing an undefined variable will generate a notice error.
  2. Warnings: These are more serious errors that may prevent the script from executing as intended, but they do not cause the script to stop executing. For example, a missing file or an invalid function argument will generate a warning error.
  3. Fatal Errors: These are critical errors that prevent the script from executing. They stop the script immediately and generate an error message. For example, a syntax error or a call to an undefined function will generate a fatal error.

Where can you find WordPress Error Logs?

In most cases, the WordPress error log is located on the server where your WordPress site is hosted. To access the log, you may need to use a file manager or FTP client to log in to your server and navigate to the log file.

Error logs contain sensitive information such as server paths or even database credentials, so it’s the logs are often stored outside the public directory where your website is hosted.

Error logs can be found in a few different places, depending on how your WordPress installation is set up:

  1. PHP error logs: If your server is configured to log PHP errors, you can find them in the PHP error log file. The location of this file is specified in the error_log directive in your php.ini file.
  2. Server error logs: If you have access to your web server’s error logs, you can look for any errors related to your WordPress site there. The location of these logs varies depending on the type of server you’re using, but they’re often stored in the /var/log/ directory on a Linux server.
  3. WordPress error logs: WordPress also has its own error log that logs certain types of errors that occur on your site. By default, this log is not enabled, but you can enable it by adding the following code to your wp-config.php file: define( ‘WP_DEBUG_LOG’, true );. Once you’ve added this code, the WordPress error log will be stored in the wp-content/debug.log file.

Some hosting companies have built error logs into their dashboards to make them easier to find. This image below is taken from WPEngine. If you’re a WPEngine customer, go to the “Error logs” link in the middle of your dashboard. Click here for more on WPEngine error logs

WPEngine error logs

This next screenshot is from another hosting company called Kinsta. If you’re a Kinsta customer, go to the “Logs” link at the bottom of the hosting dashboard. Click here for more on Kinsta error logs.

Kinsta error logs

Cloudways is another popular WordPress hosting company. If you’re a Cloudways customer, go to “Monitoring” and then “Logs”. Click here for more on Cloudways error logs.

Cloudways error logs

More on Logtivity’s hosted logs for WordPress sites

So we’re delighted to say that Logtivity has hosted error logs for all your WordPress sites.

One problem that agencies kept talking about was error logs: they all agree that hosting companies have terrible error reporting. When something goes wrong with a site, it’s really difficult to track down the problem using the hosting company’s tools.

If something goes wrong on your WordPress site, you can use this Logtivity feature to quickly understand the problem. And if there’s a Fatal Error that takes your site offline, we’ll send you immediate notifications.

Join Logtivity today with a 10-day free trial and you’ll immediately get access to the error logs.