When something on your WordPress site isn’t working as expected, the cause is often an underlying PHP error that isn’t visible on the screen. This can happen with any theme or plugin, including Burst Statistics. To find the root of the problem, you need to enable WordPress’s built-in debugging mode to display errors an an error log. In this guide, you will learn how to debug in WordPress for solving site issues.
This guide will show you two methods for enabling debug mode in WordPress: a simple plugin-based approach and the standard method involving some more knowledge.
Important: The WP_DEBUG mode is a developer tool. While it is very useful for troubleshooting, it should not be left active on a live website. When enabled, it can display error messages on your public-facing pages, potentially revealing sensitive information about your server setup. We strongly recommend using a staging site for debugging. If you must debug on a live site, disable the feature as soon as you are finished.
Method 1: Using the WP Debugging plugin
This is the easiest and quickest method, perfect if you are not comfortable editing code. The WP Debugging plugin handles all the configuration for you. For WordPress website owners wanting to debug in WordPress with minimal effort, this plugin provides a straightforward solution.
- Log in to your WordPress dashboard.
- Navigate to Plugins > Add New Plugin.
- In the search bar, type “WP Debugging“.
- Find the plugin by Andy Fragen and click Install Now, then Activate.
That’s it. The plugin automatically enables WP_DEBUG and configures it to save errors to a log file without displaying them on your site.
You can access the debug log in the top menu when logged in. Navigate to ‘Debug Quick Look’ and then click on ‘View File’. Here you can view the debug log and find relevant information for you to share with our support team.
To turn debugging off, simply deactivate the plugin from your plugins list.
Method 2: Manually enabling debugging via wp-config.php
This method gives you more control and is the standard way to enable debugging in WordPress. It involves editing one of your core WordPress files. Additionally, this process is particularly useful if you want to debug in WordPress manually without relying on plugins.
Warning: The wp-config.php file contains your website’s base configuration details, including database credentials. A syntax error in this file can make your entire site inaccessible. Always create a backup of this file before making any changes.
- Connect to your server. Use an FTP client (like FileZilla) or your hosting provider’s file manager to access your website’s files.
- Locate
wp-config.php. This file is in the root directory of your WordPress installation (the same folder that containswp-contentandwp-admin). - Download a backup. Right-click the file and download a copy to your local computer. This is your safety net.
- Edit the file. Open
wp-config.phpand find the following line:
/* That's all, stop editing! Happy publishing. */
- Add the debug code. Just before that line, paste the following code snippet:
// Enable WP_DEBUG mode
define('WP_DEBUG', true);
// Enable Debug logging to the /wp-content/debug.log file
define('WP_DEBUG_LOG', true);
// Disable display of errors and warnings
define('WP_DEBUG_DISPLAY', false);
@ini_set('display_errors', 0);
Let’s break down what this does:
define('WP_DEBUG', true);enables the debugging feature.define('WP_DEBUG_LOG', true);tells WordPress to save all errors to a file nameddebug.log.define('WP_DEBUG_DISPLAY', false);prevents errors from being shown on your website’s pages. This is crucial for live sites.
- Save your changes. Upload the modified
wp-config.phpfile back to your server, overwriting the original.
Finding the wp debug log
After enabling debugging and reproducing the issue on your site, WordPress will generate a log file. You can find it here: your-site/wp-content/debug.log. Notably, this is where you can check results after you debug in WordPress to view PHP error details.
You can open this file in a plain text editor to see a chronological list of all PHP notices, warnings, and errors.
Here you can find relevant information about why something might not work the way it should. If you see errors for Burst Statistics or Burst Pro, please share this information with our support team.
Disabling manual debugging
To turn off debugging, simply edit your wp-config.php file again and change true to false in the WP_DEBUG line. If you want to stop debug in WordPress, that’s the way to do it.
define('WP_DEBUG', false);
How this helps with Burst Statistics
Enabling debugging is a key step in troubleshooting issues within your WordPress dashboard. If you notice that the Burst Statistics dashboard is not loading correctly, is showing an error, or appears broken, the debug.log file will often contain a specific error message that points to a conflict with another plugin or your theme. This information is invaluable for our support team to help you resolve the problem quickly.
However, if your issue is related to visitor tracking please follow the steps in our dedicated guide: Troubleshoot Tracking – What to do when there is no traffic?
If you have generated a debug.log file but are unsure how to interpret the errors, please feel free to reach out to our support team and include the relevant error messages. We’re here to help.