WordPress core is making the jump from jQuery 1.12.4 to jQuery 3.5.1! This is a big deal for lots of reasons — like modern features, better DX, and security improvements to name a few. Right now, the plan is to release the update in WordPress 5.7, which is slated to release on March 9. 🤞
WordPress is notorious for its backwards compatibility and you could say this change is a relic of that philosophy. A line has been drawn in the sand when it comes to jQuery, and 1.x ain’t a part of plans moving forward. But it also represents a breaking change, and that’s sorta rare in the WordPress world. Because WordPress ships with jQuery installed, many developers call that version of it rather than re-installing it in another location. That includes lots of theme and plugin developers, all of whom now need to make sure their code is compatible with jQuery 3.x.
Not doing so could result in lots on borked sites. But, hey, we have about a month left to work on it, right?
The change has actually been in the works for some time. The work began in WordPress 5.5, and 5.7 is technically the third of three phases. WordPress 5.6 is where the Core Team bumped jQuery up to version 3.5.1 and updated jQuery Migrate to help developers revert back to legacy jQuery, if needed. In other words, this has been a super methodical approach. The Core Team deserves a lot of kudos for that, including all of the communications that have gone out about the change.
I wrote something up about the transition a couple of weeks ago, including a sort of how-to for testing things in advance, and troubleshooting issues after the fact. It’s aimed at beginners, but maybe you’ll find it helpful too. Make WordPress Support has its own thorough article as well, and it calls out a plugin that the WordPress team made just for this transition. It’s pretty sweet: it can roll your site back to jQuery1.x automatically if it detects a fail. It also documents those fails and sends notifications when they happen.
The key is to start testing now in WordPress 5.6. The plan is to disable jQuery Migrate in WordPress 5.7, so waiting for that release is too late. If you do wait that long and find issues, your best path forward is likely to roll back to 5.6 anyway to take advantage of jQuery Migrate and the helper plugin.
The work began about 5 years ago: https://core.trac.wordpress.org/ticket/37110
Well slot of sites had auto auto and all the menus stopped working. Search the net and see millions of sites ” worked,” as h say. I think html bootstrap will be the leader in future, less hacks, no updates plugins and WordPress issues. WordPress is loosing customers left right and centre. Just my opinion.
I’m not sure a CSS framework has the ability to overtake a CMS. They’re not mutually exclusive as they often complement one another.
The numbers beg to differ.
This might sound dumb but please take this as a genuine query. Why not move away from jQuery ?
It’s not a bad question! I’m not sure I’m well qualified to answer but I imagine there’s a lot of WordPress Core code that relies on jQuery and moving away from it would be very, very hard — not to mention all the themes and plugins that use it as a dependency.
Basically is because WordPress has rely on jQuery since it’s beginning adding it to your site even if you don’t need it. You can always force WordPress to not add jQuery through code. The really bad thing is that pretty much everything from plugins to front-end admin site uses jQuery. And don’t forget about the auto update feature that WordPress offers which I think is something other CMS needs.
I would like to see a lighter and customizable headless version of WordPress where you can change the db you want to use and somehow use the advantage of the plugins
bad enough that WP is still a thing, but how is jquery still a thing?
I’d imagine it has something to do with 40% of all sites running on WordPress and 77% of sites running jQuery. You might not use them, but the vast majority of folks still do, and there’s nothing wrong with that either way.
Why are there so many jQuery haters here? jQuery is amazing!
Because we can do things that jQuery provides without jQuery. JavaScript has evolved and programmers don’t like depending on libraries because it has always a security risk.
WP has the best comprehensive support for its community. JQuery is essential to at least 70% of the web. Great move WP!
Thanks for this article! I will stay with my eyes on website on next update.
I hope this jQuery update doesn’t broke all. This kind of update is one of the reasons that i dont recommend to use a bunch of plugins on WordPress.
Stay clean! Stay safe!
Conflict is coming
I’ll always love WP ♥