Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress: How to Troubleshoot a Plugin or Theme Conflict

How to Troubleshoot a Possible Plugin or Theme Conflict

Debugging a plugin or theme conflict should be done on a staging site if possible.

While you're debugging, you should have the JavaScript console or PHP error log (depending on the type of error) in view in real-time.


1) Make a full backup of your site.

Make sure you have a recent full backup of your site (live or staging) and theme settings.

2) Deactivate all active plugins except for the plugin you're seeing the issue happen.

Deactivate all your plugins except for the plugin you're seeing the issue happen. If you have to do this on your live site, pick an off-peak time.

It's a good idea to select the active plugins filter near the top of the Plugins page and print that to a PDF file so you know which plugins to reactivate when you're done.

There's also a Health Check & Troubleshooting plugin that can help automate the turning off and on of all your plugins. But, it only works for the current logged-in user. That's great because only you will notice plugins going on and off. It's not so great if you need to log in as a different user to actually reproduce the error.

Note: If you have any custom code, you should probably deactivate those too.

What if you don't have admin access to your site?

Follow these instructions from wordpress.org if you can't log into your /wp-admin/ area.

3) Test for the error.

Once that's done, with only that 1 plugin from step 2 enabled, try the following (using a JavaScript error as an example):

  • Purge any server, database, and CDN cache.
  • Open an incognito/private browser window. Incognito and private windows should start with a clean browser cache, no cookies, and no history.
  • Load your site in the private window with your JavaScript console open.
  • Check your JavaScript console for errors (e.g., Chrome > View > Developer > JavaScript Console).

If the JavaScript (JS) errors are gone, that means there's a plugin conflict.

4) Reactivate the plugins (from step 2) one by one.

You can start enabling plugins one by one until you see the JS errors come back in the console.

The last plugin you reactivated before you saw the JS errors come back is almost always the cause of the conflict. You'll need to report the issue to the plugin's author.

5) Check for a theme conflict.

If the JS errors still show up with all plugins deactivated except for that 1 plugin from step 2, try switching your theme to a default WordPress theme (Twenty Twenty or Twenty Twenty-One, for example).

If the JS errors disappear after switching themes, then there's a theme conflict. You should contact the theme's author or think about using a different theme.


Helpful plugins

@marklchaves
Copy link
Author

marklchaves commented Oct 5, 2021

Deactivating all plugins except for 1 plugin

wordpress-deactivate-all-plugins-except-1

The Chrome Console Window

chrome-console-window-no-errors

An example JavaScript error in the console

console-javascript-error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment