Debugging a possible clash between plugins and/or a theme

I’ve had to explain this many times, so now I just  link here.  Instead of messing around randomly trying different things, hitting more buttons, approach your problem systematically.

from one of my favourite comics http://xkcd.com/722/

Your theme and plugins can interact in ways that plugin or theme authors do not even realise.  For example tweaks to the wp query may unintentionally affect another plugin’s operation.  Inappropriate Javascript  inclusion also often clashes across wordpress.

The only definitive way to isolate the cause sometimes is to

  1. put your site into maintenance mode and then
  2. deactivate/activate plugins and your theme testing each step of the way.

First determine how to make the  problem visible.  What actions do you take that cause it?   Note the steps down – you will repeat these steps each time you make a change.

Disable any caching plugins and be aware you may need to clear your browser cache too, to ensure you are  seeing ‘new’ behaviour when you are testing.

Now decide which way you’d like to go.  This kinda depends on whether you have an inkling of which plugins might be causing a clash.  Personally I prefer option 1.  It tells me something the quickest, and knowing something sooner rather than later is rewarding.

Quick and Brutal Approach (gives info asap)

deactivate all plugins except the plugin you trying to get working. This has the advantage of fairly quickly telling you that the plugin does/does not work by itself:

  • Problem gone when just that plugin?  The plugin itself might still be causing the clash, but at least now you have some info to pass on to the developers.  Follow the’ problem gone’ after theme switch below.
  • Problem still there ? Switch to a default theme.  Themes do sometimes mess with wordpress operation.
    • Problem still there ? If you now have just the one plugin active and you are sure you are seeing updated pages, you can advise the plugin author that you are seeing the problem on a default wp theme and with no other plugins active.
    • Problem gone? Ok,  now go back to your theme.
      • If the problem reappears you know it is something clashing between your theme and the plugin.  Advise both authors with as much detail as you can.
    • Problem still gone now that you have your theme back?  Now slowly, checking after each activation, reactivate your plugins, starting with your most essential ones.  At some point the problem will re-occur, then you know the clash is between the most recently activated plugin and your new problem one.
    • Problem stays gone once all is reactivated? Weirdly this can happen.  Sometimes it is the order of activation that causes the problem.  Don’t close your eyes and celebrate – a plugin update could cause the problem to come back.  Now you may have to play around with activation sequences here to find the clash

Slow and Steady also gets there in the end

Another approach is step by step deactivation and  switch theme to default theme until the problem disappears.

At some point the problem may go away, then reactive the last plugin active and check if the problem comes back.   Now you know it is part of the ‘clash’ somehow.

Recently Active Plugins

If you are one of those folks who keeps a lot of deactivated plugins hanging around and you forget which ones you really need, don’t panic – WordPress very nicely gives you a week in which it remembers which plugins you had active recently.