Updated on 15 April, 2026 by Joel Barbara
How to set up and analyze WooCommerce (error) logs + plugin!
Error logs are a must-have tool for troubleshooting WooCommerce errors. They provide valuable information about any PHP errors that occur, allowing you to resolve them quickly.
This article will show you how to set up and analyze WooCommerce error logs. We will also explore how to supplement the WooCommerce logs with a plugin, empowering you to see the bigger picture. With this knowledge, you’ll be able to identify and fix any issues with your online store quickly.
Table of contents
WooCommerce logs
WooCommerce does not have its own logs. As it’s written in PHP, any WooCommerce errors will show up in the PHP error log. WooCommerce offers its own PHP error log collection and management, which makes the logs more accessible. It also provides for a greater degree of control over how you manage logs.
The WooCommerce error logs will typically contain the same information as the PHP error log that you’ll find on the web server. One major advantage, however, is how those logs are accessed. WooCommerce makes accessing the log file much easier – but first, they need to be enabled.
Enabling WooCommerce logs
To enable WooCommerce logs, first navigate to WooCommerce > Status and click on the Logs tab. Next, click on the Settings option, which you’ll find right underneath the tabbed options.

Tick the Enable logging checkbox and then choose whether you would like to store the log files as a file or in the database.
Geek note: WooCommerce has a different log handler for each storage option. Logs are recorded into files by the AutomatticWooCommerceInternalAdminLoggingLogHandlerFileV2 handler while the WC_Log_Handler_DB log handler is used when selecting the database option.
Lastly, choose the Retention period, which defines the number of days logs will be retained and the Level threshold. When setting the level threshold, keep in mind that anything with a severity that is lower than the option you choose will not be logged. Choose None if you would like to keep a record of everything.
Under File system settings, you’ll also find the following:
- Status: This tells us whether the log is up and running or experiencing an issue
- Location: The absolute file path of where the log files are stored
Accessing WooCommerce PHP error logs
As we mentioned earlier, WooCommerce error logs are easy to access. You can view all logs straight from the WordPress admin dashboard and download them should you want to.
To access the logs, navigate to WooCommerce > Status and click on the Logs tab. By default, this will open the Browse window, where you can view all available log files. If it does not, click on Browse right underneath the tabbed options.

To open a log file, simply click on the name, which you’ll find under the Source heading. This will open the log file directly in WordPress. To go back, click on Browse.
Understanding WooCommerce logs
WooCommerce organizes logs by source and date. Instead of one big log file, you’ll find multiple log files for each day. Each of the log files will contain log messages related to the source that generated them. So, for example, fatal errors will be logged in the fatal-errors log file, while debug logs will be logged in the debug-log-generator log file.
The source is set according to the extension or section of the WooCommerce code that generated the log entry. Furthermore, a new log file is started every day for each source.
Each log entry will include the following information:
- Timestamp: Lets you know the date and time of when the error occurred
- Level: Indicates how severe the event is (we will cover this in more detail in the next section)
- Message: The body of the log entry which provides information about what happened
- Source: The section of the code that generated the error
- Context: Like metadata, it provides additional information related to the event
Additionally, if backtrace is enabled, the entry will include an error stack trace. This may include:
- A link to the PHP file that generated the error, starting at the server’s root folder
- The line of code where the error was encountered
- The name of the function and class that generated the error
Log levels explained
Levels tell us how severe a given issue is. This is important for two reasons. Firstly, it allows us to prioritize (php fatal errors tend to be more pressing affairs), and filter the log so that we can see the ones that are of most interest to us.
1: Emergency: The highest severity level, indicating that WooCommerce has become unusable
2: Alert: Above-critical severity level and should be looked into immediately
3: Critical: Critical conditions encountered that should be looked into as soon as possible
4: Error: Error conditions encountered
5: Warning: Exceptional conditions encountered that are not errors
6: Notice: Indicates normal but significant conditions
7: Info: Informational messages
8: Debug: Debug-level messages
Setting up custom log files
If you add custom code, such as a WooCommerce extension, you might want to add logging capabilities. This ensures that when events such as fatal errors occur, they are duly reported in the WooCommerce log files.
You can achieve this using the wc_get_logger() PHP function to access the WC_Logger class using the following method:
WC_Logger::log( $level, $message, $context )Extending the error log with a WooCommerce activity log
Logging errors is important, especially in the development stage and when experiencing technical issues. However, the error log will have little to no impact in helping you manage and secure your WooCommerce website. In this regard, an activity log is far more helpful.
What is a WooCommerce activity log?
Just like the WooCommerce error log logs errors, the WooCommerce activity log logs user and system activities. WooCommerce does not support this functionality straight out of the box, so you’ll need a plugin such as our very own WP Activity Log.
WP Activity Log offers a very comprehensive activity logging solution that covers both WordPress and WooCommerce. It includes out-of-the-box compatibility with several other third-party plugins. With such extensive coverage, the plugin offers unprecedented views of what goes in your WooCommerce store.

Activity logs are very different than php error logs or web server errors. They are more operational than technical, providing a picture of what users and the system get up to.
WooCommerce activity logs in detail
WP Activity Log offers out-of-the-box compatibility with WooCommerce. It can track WooCommerce-native events, enabling you to;
- Ease troubleshooting processes
- Spot fraud attempts
- Achieve compliance
- Improve user accountability
Ease troubleshooting processes
WP Activity Log can help you make the most out of WooCommerce error logs by providing context on the error. Let’s say you got a fatal error, but you’re not quite sure what triggered it. By consulting the activity log, you can see what user activities were being carried out at the same time the error occurred.
So, if a plugin update took place at the same time WooCommerce threw PHP fatal errors, we can quickly disable that plugin or revert it to an earlier version. In such cases we do not have to sift through countless php error logs, or disable all plugins for that matter – the answer is right there.
Spot fraud attempts
Fraud is in an upward trend, with many e-commerce store owners finding themselves in the sightlines of criminals. Keeping a log of WooCommerce user activities ensures you have something to refer to should you spot any suspicious behavior.
One tactic that fraudsters employ is to change the address after an order is placed, later claiming they didn’t receive the package. Since WP Activity Log timestamps all events, you’ll be able to see exactly what happened and when, helping you ensure you are not taken advantage of. The same applies to unauthorized quantity changes, illegitimate coupon codes, and other such activities.
Achieve compliance
Standards such as GDPR require companies to keep an access log detailing who accessed which resources. Since WP Activity Log covers WooCommerce, WordPress, and several other 3rd party plugins, the access log will cover your entire website.
WP Activity Log keeps a record of the date and time as well as IP address, user, and what changes were made.
Improve user accountability
Holding users accountable goes a long way in preventing technical and operational accidents that can easily be avoided. It ensures everyone works with due diligence and adheres to procedures.
Using the previous example of an update gone wrong, the WP Activity Log log will tell us which user initiated the update. If this wasn’t in line with the WordPress update strategy, it’ll provide an excellent opportunity to re-share the strategy, ensuring everyone is aware and on board, thus preventing similar incidents in the future.

Monitor user and system activity with support for 3rd party plugins and session management.
Logs – the unsung heroes?
PHP error logs are an excellent tool that helps administrators and developers understand what triggered a particular issue. The real power of error logs becomes more evident when combined with an activity log, providing you with a wider view of the intricate dance between users and systems.
The benefits speak for themselves. Whether you’re looking at minimizing downtime, monitoring fraud, complying with regulations, or helping the team, logs are the one tool you can’t afford to do without.
Frequently Asked Questions
Where do I find WooCommerce logs?
When enabled, the WooCommerce logger stores logs in the wp content folder by default. However, you can also access the logs through the WordPress admin dashboard. Navigate to WooCommerce > Status and then click on the Logs tab. All available logs will be listed here, filed by source and date.
How to enable WooCommerce logs?
To enable WooCommerce to log errors on your site, first navigate to WooCommerce > Status. Next, click on the Logs tab and then choose Settings. To enable the WooCommerce logger, tick the Enable logging checkbox and Save changes.
What is the WP Activity Log for WooCommerce?
WP Activity Log is a user and system activity log plugin for WordPress. It comes with support for WooCommerce straight out of the box, logging activities related to products, store, orders, coupons and much more. While it does not keep php error logs, it offers a solid view of user and system changes related to WooCommerce. It can be used in conjunction with WooCommerce error logs to help you improve troubleshooting processes.
