How to Enable Your WooCommerce Debug Log in Less Than 5 Minutes

Bulletproof Backups for Your WordPress Website

Fortify your business continuity with foolproof WordPress backups. No data loss, no downtime — just secure, seamless operation.

woocommerce debug log

Nothing kills your momentum like a WooCommerce store that suddenly starts acting up. Checkout errors, payment failures, and unknown glitches. They all add up to lost sales and frustrated customers.

Here’s the thing: you don’t need to hire a developer or spend hours guessing what went wrong

Just as you would enable debugging for a WordPress site to track down issues, you can do the same for your WooCommerce site using the WooCommerce debug log. In this guide, we’ll walk you through how to enable and access it.

TL;DR: You can enable your WooCommerce debug log by updating settings in the wp-config.php file. Always use a backup plugin to safeguard your site. While debugging resolves issues, backups ensure recovery from any troubleshooting mishaps.

Benefits of using a WooCommerce debug log

Your WooCommerce debug log is essential for diagnosing store issues. This includes checkout errors, payment failures, and site glitches. It reveals exactly what’s happening behind the scenes.

It prevents lost revenue. When customers can’t complete purchases, the debug log tells you why. Instead of losing sales without knowing the cause, you’ll see specific error messages.

It speeds up troubleshooting. When something breaks, the debug log pinpoints exactly where the problem is happening. Is it a plugin conflict? A theme issue? A database problem? You’ll know within minutes.

It reveals performance bottlenecks. When your store feels sluggish, the debug log records which functions or database queries are slowing things down. 

It tracks security issues. The log captures multiple suspicious login attempts and potential security threats. It provides concrete data when you suspect something’s wrong.

It catches PHP errors. When features break or pages don’t load properly, the debug log records the PHP errors, notices, and warnings that caused the problem. You’ll see exactly which code is failing and why.

Enable WooCommerce debug log manually

Before you start, make sure you have a recent backup of your site. Keep in mind that you’ll be editing a core WordPress file. While these changes are safe, it’s always better to have a backup ready.

General debugging

Find your wp-config.php file using your hosting control panel’s file manager or an FTP client. You can locate it in the root folder (often named public_html or www).

wp-config.php file in the root folder

Locate this line in your wp-config.php file: “That’s all, stop editing! Happy publishing.” Once you do, add the following code above this line:

define('WP_DEBUG', true); 

define('WP_DEBUG_LOG', true);  

define('WP_DEBUG_DISPLAY', false);

define('WPS_DEBUG', true);

This basic setup captures WooCommerce errors and issues, storing them in a log file. It keeps them hidden from site visitors to maintain a professional appearance. This approach helps you efficiently resolve issues without impacting your site’s front end.

Debugging add-ons

Depending on what type of problem you’re troubleshooting, you can add these additional WooCommerce debugging options:

1) Scripts and styles

To find issues with your website’s look and functionality, add:

define('WPS_DEBUG_SCRIPTS', true);

define('WPS_DEBUG_STYLES', true);

Websites typically use compressed code to load faster, but it can be difficult to troubleshoot. With this code, you enable the full, uncompressed versions of scripts and styles. This makes it easier to identify errors affecting your site’s appearance and functionality. This helps quickly resolve layout issues or broken features.

2) DOM Parsing

To troubleshoot how your site’s content is structured and displayed, add:

define('WPS_DEBUG_DOM', true);

The DOM (Document Object Model) is like a map showing how everything on your web page is arranged and relates to each other. By enabling this setting, you activate an extra layer of information about this map. This helps identify if elements like text, images, or buttons aren’t appearing or behaving correctly.

3) Caches

To investigate problems with how your website stores temporary information, add:

define('WPS_CACHE_DEBUG', true);

Websites store some data temporarily so they can load faster later. By enabling this setting, your site logs detailed activities related to this temporary storage. This helps identify issues like information not updating or loading incorrectly.

Save your wp-config.php file and upload it back to your server if you’re using FTP. Your WooCommerce debug logging is now active.

Upload file to FTP

Important: After adding any of these debugging lines, clear all caches (browser, plugin, server) or the changes won’t take effect.

Use a plugin to enable WooCommerce debug logs

For those who prefer not to edit files directly, using a debug plugin is a simple and efficient alternative. Here’s how to set it up:

  • Install and activate a debug plugin: Log in to your WordPress dashboard and navigate to Plugins and then Add New. Look for your desired WordPress debug plugin, install and activate it.
  • Configure and enable debugging: Access plugin settings by locating the plugin in your WordPress admin sidebar and clicking on its settings. Use the toggle switch or button if provided by the plugin to activate debugging easily.

Access WooCommerce debug log files

Method 1: Through your WordPress dashboard

  • Log in to your WordPress admin area and navigate to WooCommerce > Status and click the Logs tab
WooCommerce > Status
  • You’ll see all available log files listed by date. Just click any file to view its contents.
WooCommerce debug log

Method 2: Via FTP or file manager

  • Access your site files through FTP or your hosting control panel’s file manager
Access site files via FTP
  • Navigate to wp-content/uploads/wc-logs/ You’ll see all your WooCommerce log files stored as text files.

Method 3: Via the debug plugin (if used)

  • Open your WordPress dashboard and navigate to the Tools section.
 navigate to the Tools section and find plugin
  • Locate your debug plugin listed there. Click on the plugin’s name to view detailed logs.
Debug plugin interface

Disable WooCommerce debug log

Once you’ve solved your problem, turn off debug logging. Leaving it on creates issues you don’t need.

  • Open your wp-config.php file using FTP or your hosting file manager and find the debug lines you added earlier.
  • Change all the true values to false or delete those lines completely. Once done, save and close the file.

If you have used a debug plugin, just deactivate it in the Plugins section on your WordPress dashboard.

Why do you need to disable debug logging

It prevents server bloat. Debug logs pile up fast and eat your storage space. A busy store can generate massive log files that slow down your server.

It improves site speed. Your server stops wasting resources writing constant log entries, which means faster page loads for your customers.

It protects sensitive data. Debug logs can capture customer information, payment details, and other sensitive data you don’t want sitting in text files.

Parting thoughts

Your WooCommerce debug log gives you the power to solve problems fast. The key is to use it strategically. Just enable it when issues arise, diagnose the problem, then disable it back off to keep your store running smoothly.

Start with general debugging for most issues, but remember you can get more specific when needed. Scripts and styles debugging helps with display problems, DOM debugging tackles layout issues, and cache debugging solves data loading problems.

FAQs

How to check WooCommerce error logs?

Check WooCommerce error logs by navigating to WooCommerce > Status > Logs in your WordPress dashboard. Select the desired log file from the dropdown and click “View” to access details about errors and issues.

How do I view debug logs in WordPress?

To view WordPress debug logs, access the debug.log file located in the wp-content directory. You can view this file using your hosting control panel’s file manager or an FTP client.

How to open debug in WordPress?

Enable debugging in WordPress by adding specific lines to your wp-config.php file. This includes setting WP_DEBUG to true to start logging errors for troubleshooting.

Where is WooCommerce data stored?

WooCommerce data is stored in your WordPress database, primarily in tables prefixed with wp_woocommerce and wp_wc_. This data includes orders, products, and customer information.

How to hide debug log in WordPress?

To hide the debug log in WordPress, ensure WP_DEBUG_DISPLAY is set to false in your wp-config.php file. This keeps error messages hidden from the front end while still logging them.

Tags:

You may also like


Mailster review
The Ultimate Mailster Review: Read This Before You Buy

Looking for a newsletter plugin that brings marketing to WordPress? As a serious user, you’re past the basics.  You’re ready for a system that doesn’t penalize you for growing your…

How do you update and backup your website?

Creating Backup and Updating website can be time consuming and error-prone. BlogVault will save you hours everyday while providing you complete peace of mind.

Updating Everything Manually?

But it’s too time consuming, complicated and stops you from achieving your full potential. You don’t want to put your business at risk with inefficient management.

Backup Your WordPress Site

Install the plugin on your website, let it sync and you’re done. Get automated, scheduled backups for your critical site data, and make sure your website never experiences downtime again.