On 25 February, we wrote about the new features and enhancements expected in WordPress 5.7. In the article, we mentioned about the WordPress core team’s 3 stage plan to update jQuery from version 1.12.4, which was launched in 2016, to 3.5.1, the latest version. Stage 1 was when WordPress 5.5 was launched, stage 2 came with WordPress 5.6 and stage 3, the final stage will take place with the launch of WordPress 5.7 on march 9, 2021.
Why a 3 Stage Plan?
Simply because the updating of jQuery to version 3.5.1 can potentially break your website. Until 5.5, WordPress was still using the legacy version of the jQuery javascript library. And because jQuery comes shipped with every copy of WordPress, many themes and plugins likewise relied on this outdated version as well. Replacing it with version 3.5.1 is easy, but it will mean that these themes and plugins may not longer work as intended. The WordPress team thus had to give developers enough time to update their themes and plugins to make them compatible with jQuery 3.5.1.
The Temporary Solution
When WordPress 5.5 was launched, the jQuery migrate helper, which was previously enabled by default, was removed. This caused loss in functionality in many sites running old themes and/or plugins. To get their sites running properly again, site owners had to install a plugin to re-able the jQuery migrate helper. Called the Enable jQuery Migrate Helper plugin, it also flagged out to site owners the dated themes and plugins relying on deprecated jQuery functions so that site owners can identify the problem causing themes and/or plugins.
With WordPress 5.6, jQuery itself was updated to version 3.5.1 but the jQuery migrate helper plugin allowed sites to downgrade to a lower version of jQuery. This downgrade allowed sites with problematic older themes and plugins (that would otherwise have caused errors) to continue functioning normally. And because their sites are still functioning, some site owners are using it like a permanent fix, which can be dangerous.
The enable jQuery Migrate Helper plugin was never intended to be a permanent fix. It was only intended as an interim solution between WordPress 5.5 and 5.6 to give site owners time to update their problematic themes and plugins to ones that are compatible with the latest jQuery version as well as to give developers time to develop these updates.
Relying On Enable jQuery Migrate Helper Indefinitely Is Dangerous?
One of the plugin authors, Marius L. J. has already stated that the WordPress development team will no longer push new jQuery fixes to this plugin moving forward. Also jQuery 1.12.4 has long since reached it’s end of life (EOL), meaning no further bug fixes or security patches will be released even if the need arises. Hence, you are on your own in future, should your site breaks or if security holes are found in your legacy jQuery.
How to Prepare for WordPress 5.7?
If you own a WordPress website and have been updating it diligently, you would likely already noticed javascript related problems with your site as early as WordPress 5.5 and installed the Enable jQuery Migrate Helper plugin as a temporary fix. Now is the time to check the logged deprecations captured by this plugin to identify the themes or plugins causing the error. If you find any, you will either have to find alternatives for them or update them, if updates are available.
If you are still using WordPress version 5.4 or below, it is best to create a staging environment with a subdomain and clone a copy of your live site there. Thereafter update all themes and plugins plus WordPress core (on the cloned site) and check to see if the site is functioning properly. If it is, good. If not, install the Enable jQuery Migrate Helper plugin to see if it can fix the errors. If the errors are jQuery related, chances are they will be solved. Thereafter, check the logged deprecations to identify the error causing plugins and/or themes and update or replace them.
Do the above actions while we are still in WordPress 5.6.2; don’t wait till 5.7 is launched before doing these compatibility checks.
What to Do When WordPress 5.7 is Launched?
Again, it’s better to be safe than sorry. So rather than updating your live site, we recommend testing the update on your staging environment once again. Update the cloned site to WordPress 5.7 including themes and plugins that needs to be updated that day and check page by page for errors. If there are no errors, you can proceed to update your live site. If errors are found, fix them on the cloned site first before even contemplating updating of your live site.
And as always, before any update, it is a good idea to take a full backup of your website, so that if you have to roll back your live website, you have the option to do so.
Enjoy WordPress 5.7; we know we at Biz Edge will.