How to Debug Plugin Errors on a Live Site
I hate troubleshooting WordPress plugin errors because the solution usually requires switching to a default theme and deactivating all of the plugins. Then, I have to re-activate the plugins one-by-one until I find the plugin that is causing the error.
Usually, I would create a development site to do the debugging so we or our clients don’t miss out on a prospect or a sale. That requires making a copy of a site’s WordPress files and database which can be a little tedious. If you don’t feel like creating a dev site just to debug plugins, one possible option would be to use the Gravity Forms Debug Add-On. This add-on allows you to deactivate all of your plugins and activate a default theme without your visitors even noticing.
Gravity Forms is one of our favorite online form solutions, and their support team is fantastic! I don’t have many problems with their plugin, but when I do have a problem, they have been really helpful. They recommended that I use their debug add-on when I contacted them about a couple of problems that I was having with their plugin.
I noticed that the dollar sign ($) wasn’t showing up after I clicked off a user-defined product field on our own online payment form. Also, I was seeing some weird icons by each form’s additional options (Edit, Settings, Entries, Preview, Duplicate, Trash) when I hovered over each form’s name in the Gravity Forms -> Forms section.
With the help of the Gravity Forms Debug add-on, I found out that the Autoptimize plugin was causing both errors. This plugin wasn’t a necessary plugin, so I deactivated it and deleted it.
Keep in mind that you will need to purchase a Gravity Forms license and have Gravity Forms activated in order to use this debugging tool.
Even though this plugin add-on is meant to troubleshoot Gravity Forms plugin conflicts, you can use it to troubleshoot any plugin conflict. One caveat is that you can’t deactivate Gravity Forms (or its debug add-on). Another way you could troubleshoot plugin errors is by outputting plugin errors to the debug.log file.
How to Enable the Conflict Tester
To find your problem plugin, you’ll start by enabling the Conflict Tester by going to Forms -> Debug.
The explanations for the marked sections in the screenshot image above are:
- Click the Enable Conflict Tester button to disable all of your plugins and revert to a default theme.
- Take note of the Disable Link. If you get lost and don’t know how to disable the Conflict Tester, you can use that URL to disable it.
After enabling the Conflict Tester, you’ll see this screen:
The explanations for the marked sections in the screenshot image above are:
- Your current theme is deactivated and a default theme is activated.
- All plugins are deactivated except for Gravity Forms and its Debug Add-On. Click the checkbox next to any of the plugins that you want to reactivate.
- The URL to disable the Conflict Tester is given again for you to copy and paste.
- Don’t forget to click the Save Active Plugins button before you test your website.
Here’s what our website looks like with the Twenty Fifteen theme activated and all plugins disabled:
Open an incognito window in Chrome or your browser of choice, and you’ll see that your website is unaffected.
How to Activate (or Deactivate) Plugins to Find the Conflict
You can start with all of your plugins activated or all of your plugins deactivated. Be sure to activate/deactivate your plugins in the Conflict Tester section and not in the Plugins section. Before you disable the Conflict Tester, be sure to reactivate all of the non-conflicting plugins.
If you start with all of your plugins activated, you can deactivate a plugin one at a time and test between each deactivation until you no longer see the error. To speed the debugging process up, I would deactivate five plugins at a time. When you see that the error is no longer there, you can activate the last five deactivated plugins (one at a time) until you see the error again.
If you start with all of your plugins deactivated, you can activate a plugin one at a time and test between each activation until you see the error. To speed the debugging process up, I would activate five plugins at a time. When you see the error, you can deactivate the last five activated plugins (one at a time) until you no longer see the error.
Thank you for reading this blog post. If you’ve tried the Gravity Forms Debug Add-On to troubleshoot plugin conflicts, let me know in the comments. I’d love to read them.