Crest Design
WordPress 7 min read

WordPress jQuery 4 upgrade: fix old scripts before it lands

Prepare for the WordPress jQuery 4 upgrade: what jQuery Migrate 3.6 in WordPress 7.2 changes, a five-step audit with code fixes, and troubleshooting.

Crest Design
A guide to preparing WordPress themes and plugins for jQuery 4 using the jQuery Migrate 3.6 warnings in WordPress 7.2.

If your WordPress site runs older plugins, a custom theme or page-builder add-ons, the WordPress jQuery 4 upgrade is coming for that code. The WordPress 7.2 Field Guide, published in November 2026 ahead of the release planned for 8 December 2026, confirms that 7.2 ships jQuery Migrate 3.6.0, a version built to warn about code that jQuery 4 will break. This post is for site owners and marketing leads who want to know what that means, how to find the scripts at risk, and what to ask a developer to fix before the jQuery 4 switch itself arrives.

The short answer: nothing should break on the day you update to 7.2. What changes is that the warnings get louder and more useful. That gives you a window to clean up old code while it still works.

Why the WordPress jQuery 4 upgrade matters for older sites

jQuery has shipped with WordPress for a very long time, and a lot of front-end code still leans on it: sliders, mobile menus, accordions, popups, form validation, WooCommerce tweaks and many admin screens in plugins. Plenty of that code was written years ago and never touched again.

jQuery 4 removes a set of old helper functions that have been deprecated for years, such as $.trim, $.isArray, $.parseJSON, $.isFunction, $.type and $.now, plus some older behavior around events and Ajax. When a plugin calls one of those removed functions, the browser throws an error like "$.trim is not a function", and often every script after it on the page stops running. To a visitor, that looks like a menu that won't open or a checkout button that does nothing.

WordPress is handling this in stages so site owners aren't caught out. Release 7.2 updates only jQuery Migrate. The move to jQuery 4 itself is planned for 7.3, and turning Migrate off by default is pencilled in for a later release. Both of those later steps are provisional and depend on testing, so treat the dates as a direction, not a promise.

Roadmap of the jQuery change in WordPress: 7.2 adds jQuery Migrate 3.6 warnings, 7.3 is planned to move to jQuery 4, and a later release is planned to turn Migrate off by default.
The jQuery 4 path in WordPress. Only the 7.2 step is confirmed; the later steps are provisional and depend on testing.

How jQuery Migrate works in WordPress

jQuery Migrate is a small compatibility layer that loads right after jQuery. It does two jobs. First, it puts back some of the behavior that newer jQuery versions removed, so old code keeps working. Second, it logs a warning to the browser console every time old code relies on that behavior. Each warning starts with JQMIGRATE: and names the function or pattern that needs changing.

On the front end, WordPress loads Migrate as part of the standard jquery script handle, so any theme or plugin that depends on jQuery gets it automatically. What 7.2 changes is the list of things Migrate warns about. Version 3.6.0 was released by the jQuery team specifically to flag many more of the breaking changes coming in jQuery 4, while jQuery itself in WordPress stays on the 3.x line for now.

Two details catch people out:

  • Warnings are easy to miss. WordPress normally serves minified scripts. Turning on SCRIPT_DEBUG makes it load the full development versions, which is the reliable way to see every Migrate warning while you test.
  • Migrate 3.x is a bridge, not a fix. It only supports jQuery 3. When WordPress moves to jQuery 4, a different Migrate line (4.x) is needed, and anything it can't patch back will fail. Code that only works because Migrate props it up is the code to fix now.

How to find and fix jQuery Migrate warnings

Run this on a staging copy of the site, never on the live one. Most managed hosts offer one-click staging; if yours doesn't, ask your developer to clone the site.

Five-step jQuery audit for a WordPress site: copy to staging, turn on SCRIPT_DEBUG, click through key pages, trace each JQMIGRATE warning to a plugin or theme, then update, patch or replace it.
A jQuery Migrate audit in five steps, run on a staging copy rather than the live site.

1. Put staging on 7.2

Update the staging site to WordPress 7.2 (or the latest release candidate if you're testing before 8 December). With WP-CLI that's wp core update --version=7.2. Update all plugins and themes on staging too, so you're not chasing warnings that a vendor has already fixed.

2. Turn on script debugging

Add this line to wp-config.php on staging, above the line that says "That's all, stop editing":

define( 'SCRIPT_DEBUG', true );

Also switch off any "combine", "minify" or "delay JavaScript" settings in your caching or optimization plugin on staging. Combined files hide which plugin a warning came from.

3. Click through the pages that earn money

Open the browser's developer tools (Console tab) and walk through the home page, main menus on desktop and mobile, a product or service page, the contact and quote forms, cart and checkout if you sell online, and the admin screens your team uses daily. After each page, paste this into the console to list everything Migrate caught:

console.table( jQuery.migrateWarnings );

Each row is one warning. Click the matching console line to see the stack trace, which points to the file that triggered it.

4. Trace each warning to its owner

The file path tells you who owns the code: /wp-content/plugins/plugin-name/ or /wp-content/themes/theme-name/. Group warnings by plugin or theme in a simple sheet with three columns: source, warning, and the page where it appeared.

5. Update, patch or replace

For a third-party plugin, check for an update or report the warning to its author. For a custom theme or plugin your agency built, the fix is usually small. Here is what typical changes look like, in plain JavaScript that works on jQuery 3 and 4:

// Before: these helpers are removed in jQuery 4
var name = $.trim( $( '#name' ).val() );
if ( $.isArray( items ) ) { render( items ); }
var data = $.parseJSON( response );
if ( $.isFunction( callback ) ) { callback(); }

// After: native JavaScript equivalents
var name = String( $( '#name' ).val() ).trim();
if ( Array.isArray( items ) ) { render( items ); }
var data = JSON.parse( response );
if ( typeof callback === 'function' ) { callback(); }

Swap these in the theme or plugin's own JavaScript files, then reload the page and confirm the warning is gone. The jQuery 4.0 upgrade guide on jquery.com lists every removed function and its replacement.

What we've learned from jQuery clean-ups

The warnings themselves are rarely the hard part. The time goes into finding who owns each script. Sites that have been through a few redesigns often carry inline scripts pasted into theme options, tracking snippets in a header plugin, and code from page-builder add-ons nobody remembers installing. A short inventory first saves a lot of guesswork, and it pairs well with a clear policy for WordPress automatic updates, so fixed code doesn't drift again.

A few things we'd recommend:

  • Don't deregister Migrate to make warnings disappear. It hides the problem until jQuery 4 lands, then breaks things all at once.
  • Don't load your own copy of jQuery from a CDN. Some older themes do this. It sidesteps WordPress's version and can load jQuery twice. Use the bundled jquery handle instead.
  • Consider dropping jQuery for small scripts. A menu toggle or accordion often needs only a few lines of plain JavaScript. For larger features we'd keep jQuery and simply modernize the calls; rewriting working code has its own risk.

Troubleshooting

Symptom Likely cause Fix
No JQMIGRATE warnings appear at all SCRIPT_DEBUG is off, or an optimization plugin is combining scripts Turn on SCRIPT_DEBUG, disable combine and minify on staging, clear every cache and reload
jQuery.migrateWarnings is undefined The theme or a plugin deregisters jquery-migrate, or loads its own jQuery Search the theme for wp_deregister_script and remove the override so the bundled scripts load
A menu, slider or form stops working after a test update A removed helper throws an error and halts later scripts Read the first red error in the console, trace it to its file and replace the call with its native equivalent
Warnings only appear in the admin An admin-side plugin uses old jQuery code Update that plugin or report it to the author; front-end visitors aren't affected, but your team is
The stack trace points to a cache file Scripts were merged into one file by a performance plugin Exclude that page from optimization on staging so the original file names show

If a store is involved, test cart and checkout extensions with extra care; our guide to keeping WooCommerce product bundles together in block carts covers another recent cart change worth checking in the same pass.

Questions people ask

Will updating to WordPress 7.2 break my site?

It shouldn't, because 7.2 updates only jQuery Migrate and jQuery itself stays on version 3. You may see more warnings in the console, which is the point. Still test on staging first, as you would for any major release.

When does WordPress switch to jQuery 4?

The current plan is WordPress 7.3, but the core team has said this depends on testing and may move. Fixing warnings now means the switch is a non-event for you whenever it happens.

Do we need a developer for this?

Anyone can run the audit and collect warnings. Fixing custom code, or choosing replacements for abandoned plugins, is developer work. On most sites the list is short once updates are applied.

Why this matters for your business

jQuery problems tend to hit the pages that matter most: navigation, forms and checkout. They also fail quietly, so you see fewer enquiries or orders before anyone spots an error. Cleaning up now, while Migrate still covers for old code, turns a future emergency into routine maintenance.

Quick checklist:

  • Copy the site to staging and update it to WordPress 7.2.
  • Turn on SCRIPT_DEBUG and switch off script combining.
  • Click through key pages and admin screens, and collect JQMIGRATE warnings.
  • Trace each warning to its plugin or theme.
  • Update, patch or replace, then test again.

If you'd like a team to run the audit and fix what it finds, our WordPress development service can help, or you can tell us about your site.

(over to you)

Planning a build like this?

Tell us what you're building and we'll come back with ideas and next steps.