Double-loading jQuery — an old or poorly coded plugin is adding jQuery a second time, forcing every visitor to download ~90KB of redundant JavaScript.
Why This Matters
WordPress ships with jQuery built-in and handles loading it properly. Some plugins (especially older ones) bundle their own copy instead of using WordPress's, resulting in:
- ~90KB of extra JavaScript on every page
- Conflicts between the two jQuery versions
- Plugin breakage when one jQuery version overrides the other
- Higher Time to Interactive — JavaScript blocks rendering while it loads
How to Identify the Culprit
Method 1: Browser Developer Tools
- Open your site in Chrome/Firefox
- Open Developer Tools (F12)
- Go to the Network tab, filter by JS
- Search for "jquery" — you should see only ONE jQuery file
- If you see two, check the Initiator column to find which plugin loaded the extra copy
Method 2: View Page Source
- Right-click your page → View Source
- Search (Ctrl+F) for "jquery"
- Look for multiple
<script>tags loading jQuery from different paths
Common patterns:
/wp-includes/js/jquery/jquery.min.js— this is WordPress's copy (correct)/wp-content/plugins/old-plugin/js/jquery.min.js— this is the duplicate
How to Fix It
Option 1: Update the Offending Plugin
Check if the problematic plugin has an update available. Modern versions of popular plugins have fixed this issue.
Option 2: Replace the Plugin
If the plugin is old and no longer maintained, find a modern alternative that properly uses WordPress's jQuery.
Option 3: Dequeue the Duplicate via mu-plugin (Advanced)
Create a file at wp-content/mu-plugins/dequeue-duplicate-jquery.php:
<?php
/**
* Plugin Name: Dravasite – Dequeue Duplicate jQuery
* Description: Removes a duplicate jQuery script loaded by a misbehaving plugin.
* Replace 'plugin-jquery-handle' with the actual script handle.
* Version: 1.0.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
// Dequeue the duplicate jQuery — runs at priority 20 (after most plugins)
add_action( 'wp_enqueue_scripts', function () {
// Replace 'plugin-jquery-handle' with the actual handle
// from the offending plugin (inspect its source code to find it)
wp_dequeue_script( 'plugin-jquery-handle' );
}, 20 );You'll need to find the script handle by inspecting the plugin's code.
New to mu-plugins? Read our guide to adding code snippets safely with mu-plugins — it takes 2 minutes to set up and survives theme updates.
What to Watch For
- Don't remove WordPress's jQuery — many plugins and themes depend on it.
- After fixing, test interactive elements: sliders, menus, forms, modals. These commonly use jQuery.
- Some optimization plugins (Autoptimize, WP Rocket) can help by combining scripts, but they don't remove the duplicate — they just reduce the HTTP request count.
- jQuery Migrate is a separate file WordPress loads for backward compatibility. It's different from duplicate jQuery and is generally safe (though it can be removed on modern sites).