WordPress 5.7: Major jQuery update

WordPress 5.7: Major jQuery update

Wp core is making the leap from jQuery 1.12.4 to jQuery 3.5.1! This is great news for a lot of reasons that we explain here.

For its more modern features, better DX, and security improvements to name a few of these reasons. Right now though, the plan is to release the update within WordPress 5.7, which is expected to be released on March 9th.

WordPress is known for its backward compatibility and one could say that this change is a turning point in this philosophy. A clear line of change has been drawn when it comes to jQuery, and version 1.x is no longer in Automattic's plans and has decided to cut with the past. It must be said that this also represents a real breaking point, and this is quite rare in the world of WordPress.

As WordPress is downloaded with jQuery installed, many developers stick with that version rather than reinstalling it from scratch in another location. This behavior is typical of many theme and plugin developers, who now need to make sure their code is compatible with jQuery 3.x. And here the fun really begins! Not updating will result in many websites being deprecated. But where is the problem? We have about a month right? Hallelujah! There will be sweat!

The updated version of JQuery has actually been in the works for quite some time. The work started in WordPress 5.5, and 5.7 is technically the third of three stages. WordPress 5.6 is where the Core Team ported jQuery to version 3.5.1 and updated jQuery Migrate to help developers roll back to legacy jQuery if needed. In other words, this was a super methodical approach. The Core Team deserves a lot of kudos for this, including all the communications that have been made about the update!

We ran into the issue heavily already a few weeks ago, including a sort of “how-to” list to test things beforehand and troubleshoot after installation. Also Make WordPress Support has his own in-depth article, and posts a plugin that the WordPress team made just for this transition. It's quite sensitive and can roll your site back to jQuery1.x automatically if it encounters an error, document errors, and send notifications when errors are found.

The key is to start testing now at WordPress 5.6. The plan is to disable jQuery Migrate in WordPress 5.7, so waiting for that release is too late. If you wait that long and run into problems, your best route is probably to roll back to 5.6 anyway to take advantage of the jQuery Migrate and help plugin.