WordPress quietly loads an extra JavaScript file called jQuery Migrate on most sites. It’s a compatibility crutch for old code — useful while you need it, dead weight once you don’t. Here’s how to tell which, and how to remove it safely.
JQMIGRATE deprecation warnings, something on the page relies on outdated jQuery — keep Migrate and fix that code first. If the only message is JQMIGRATE: Migrate is installed (no warnings), nothing needs it, and you can remove it for a small performance win — one fewer script to load.WordPress relies heavily on jQuery for interactive features, and jQuery has moved on over the years, dropping APIs that old themes and plugins still call. jQuery Migrate is the jQuery team’s answer to that: a shim that restores the removed/changed behavior so legacy code keeps running while its authors catch up (jQuery’s own upgrade guide documents the deprecations it covers). It’s meant to be temporary — a bridge, not a permanent dependency.
Front end (not wp-admin), F12, reload. Look at the JQMIGRATE messages on your key templates.
JQMIGRATE deprecation warnings = outdated jQuery still in use. Keep Migrate; update that theme/plugin first.
Only "Migrate is installed", no warnings = nothing needs it. Dequeue it; drop one front-end script.
Table of Contents
What jQuery Migrate actually does
When jQuery releases a new major version, it removes or changes methods that were deprecated in earlier releases. Any theme or plugin still calling those old methods would break. jQuery Migrate patches the newer jQuery at runtime to restore that old behavior, and — helpfully — logs a warning to the console each time something uses a deprecated feature, so you can find and fix it.
So Migrate plays two roles at once: it keeps old code working, and it tells you which code is old.
jQuery Migrate is a bridge you’re meant to walk off — it keeps old code alive and, at the same time, points at exactly what to fix.
Why WordPress still loads it
As WordPress core and plugins adopt newer jQuery, sites with older themes or plugins would hit compatibility breaks. Shipping Migrate by default means those sites keep functioning through the transition instead of throwing errors. The trade-off is one extra JavaScript file (jquery-migrate.js) loaded on your front end — small, but not free, and pure overhead once nothing actually needs it.
How to check whether you still need it
Don’t guess — read the console:
- Open your site’s front end (not wp-admin) in a browser.
- Open the developer console (F12) and reload.
- Look at the
JQMIGRATEmessages: – Deprecation warnings (e.g. “JQMIGRATE: jQuery.fn.attr(‘value’)… is deprecated”) mean something on the page still uses outdated jQuery. Keep Migrate and fix or update that theme/plugin first. – OnlyJQMIGRATE: Migrate is installedwith no warnings means nothing on the page relies on deprecated features — it’s safe to remove.
Check your important template types (home, a post, an archive, a page with forms or sliders), since different templates load different scripts.
When to remove it
Remove jQuery Migrate once all of these are true:
- You’ve updated themes and plugins and reviewed custom code for deprecated jQuery.
- The console shows no
JQMIGRATEdeprecation warnings on any key template. - You want the small performance gain of dropping one render-path script.
If any deprecation warning remains, leave Migrate in place and fix the offending code first — removing the bridge while something still stands on it is how you get subtly broken sliders, menus, and form scripts.
Remove the bridge only after the console is quiet — pull it while something still needs it and menus and sliders break in ways that are hard to trace.
How to remove it safely
Once the console is clean, dequeue Migrate with a small snippet — a code-snippets plugin, a site-specific plugin, or your theme’s functions.php:
// Remove jQuery Migrate (front end only) once no JQMIGRATE deprecation warnings remain.
function remove_jquery_migrate( $scripts ) {
if ( ! is_admin() && isset( $scripts->registered['jquery'] ) ) {
$script = $scripts->registered['jquery'];
if ( $script->deps ) {
$script->deps = array_diff( $script->deps, array( 'jquery-migrate' ) );
}
}
}
add_action( 'wp_default_scripts', 'remove_jquery_migrate' );
Code language: PHP (php)
The ! is_admin() guard is deliberate: it leaves Migrate active in wp-admin (where the editor and many plugins still expect it) and removes it only on the front end, where your visitors are. Since this is one small, focused change, it’s a textbook case for a snippet rather than a plugin. After adding it, reload the front end and confirm jquery-migrate.js is gone and nothing broke — then re-run your key templates once more.
The short version
jQuery Migrate is a compatibility bridge WordPress loads so old jQuery code survives newer jQuery versions. Whether you still need it is a console question, not a guess: JQMIGRATE deprecation warnings mean something outdated is still in use — keep Migrate and fix that code; only JQMIGRATE: Migrate is installed with no warnings means it’s safe to remove. Removing it drops one front-end script for a small speed gain, done cleanly with a wp_default_scripts snippet that dequeues it on the front end only. Fix the deprecated code first; pull the bridge second.
Frequently Asked Questions
What is jQuery Migrate in WordPress?
It’s a small JavaScript library that restores older jQuery behavior on newer jQuery versions, so themes and plugins written for old jQuery keep working after an update. WordPress loads it by default as a temporary compatibility bridge, and it logs a console warning whenever deprecated jQuery is used.
How do I know if my site still needs jQuery Migrate?
Open the browser console on your front end and reload. If you see JQMIGRATE deprecation warnings, some theme or plugin still uses outdated jQuery and you should keep Migrate. If the only message is JQMIGRATE: Migrate is installed, nothing needs it and you can safely remove it.
Does removing jQuery Migrate speed up my site?
Modestly. It drops one JavaScript file (jquery-migrate.js) from the front end, which is a small render-path saving — worth doing once nothing depends on it, but not a substitute for the bigger wins in a speed audit.
Is it safe to disable jQuery Migrate?
Only once the console shows no JQMIGRATE deprecation warnings across your key templates. If warnings remain, disabling it can subtly break scripts (menus, sliders, forms) that rely on deprecated jQuery — fix that code first, then remove the bridge.
Should I remove it in wp-admin too?
No. Leave Migrate active in the admin, where the block editor and many plugins still expect it. The safe snippet removes it on the front end only (! is_admin()), which is where the visitor-facing performance gain is.