When a WordPress plugin’s JS breaks, it tends to break loud — a slider doesn’t render, a form won’t submit, a gallery lightbox does nothing. The console error names a file. Tracing that file back to the responsible plugin is straightforward; figuring out which other plugin or theme conflicted is the harder half.
What’s happening
JavaScript in WordPress is enqueued in a strict order. WordPress core scripts first, then themes, then plugins in the order they were activated. The page renders all of them in <head> or before </body> based on each script’s enqueue position. A plugin that assumes jQuery 1.x but loads after another plugin that ships jQuery 3.x will throw at runtime. A plugin that registers a global variable name another plugin uses will overwrite it.
The three classic conflict patterns: namespace pollution (two plugins both define window.myPlugin), event handler clobbering (one plugin’s .click() handler removes another’s), and version skew (one plugin loads its own copy of a library that another plugin expects in a different version). The console error names the file that errored, but the cause is often a different file higher in the load order.
How to verify
# Get the script load order from the rendered page:
curl -s https://example.com/ | grep -oE '<script[^>]+src="[^"]+"' | nl
# List every enqueued plugin script with WP-CLI:
wp eval '
global $wp_scripts;
foreach ($wp_scripts->registered as $h => $s) {
if (strpos($s->src, "plugins") !== false) {
echo "$h => $s->src\n";
}
}
'
# Disable plugins one at a time:
wp plugin deactivate slow-plugin
# Reload, check console
wp plugin activate slow-plugin
In DevTools, set a breakpoint on the failing line. The Call Stack panel shows which scripts called into the failing function — that’s your conflict chain.
The fix
- Read the error file path. “Uncaught TypeError in /wp-content/plugins/foo-slider/main.js:42” — start with
foo-slider. Check its version, check its requirements, check the WordPress.org plugin page for known conflicts. - Bisect plugins. Deactivate half, reload, check console. If error gone, the conflict is in the deactivated half. Repeat until you find the pair.
- Check for jQuery noConflict patterns. Many old plugins use
$directly when jQuery is innoConflictmode (which is WordPress default). The fix is wrapping the plugin’s code injQuery(function($) { ... }). If the plugin author won’t fix, a smallmu-plugincan intercept and wrap. - Use
script_loader_tagto reorder. If plugin A must load before plugin B, thescript_loader_tagfilter lets you adjust without editing plugin files. Or usewp_enqueue_scriptwith explicit dependencies. - Check for double-enqueued libraries. Two plugins each enqueueing their own Slick Carousel breaks both. Use
wp_dequeue_scriptinmu-pluginsto drop the duplicate. - Disable browser caching while diagnosing. Hard refresh (Cmd+Shift+R) and uncheck “Disable cache” in DevTools Network panel. Otherwise the old broken version stays loaded.
For sites with plugin-heavy front ends where JS conflicts recur after updates, Stack Harbor catches them in enterprise WordPress hosting CI. For help isolating a current conflict, book a consult.