WordPress and jQuery. What’s the Future?

WordPress is planning major jQuery changes in version 5.5 and future versions. Since WordPress relies on jQuery which is a popular JavaScript framework, the WordPress team wants to update jQuery to the latest possible version. In the long term, they want to minimize or completely remove the reliance on the jQuery framework as mentioned in this blog post. Following are some short notes about this topic:

  • Currently, WordPress provides jQuery with version 1.12.4 released in 2016.
  • The WordPress team wants to update the jQuery version gradually because many themes and plugins are using an older version of jQuery as a dependency.
  • In the long term, the WordPress team is planning to move WordPress admin to vanilla JavaScript.
  • The WordPress team has released a plugin named Test jQuery Update which can be used to test themes and plugins compatibility with the latest jQuery update.
  • The first step in this process was the removal of jQuery Migrate 1.4.1 script from the core WordPress version 5.5 which will break some plugins and themes code.
  • The WordPress team has released a helper plugin Enable jQuery Migrate Helper which can be used if there are any issues after updating to version 5.5. This plugin re-enables jQuery Migrate and warns about the deprecated code used by themes or plugins.
  • As a second step, the WordPress version 5.6 is shipped with the updated versions of jQuery (3.5.1), jQuery Migrate (3.3.2), and jQuery UI (1.12.1).
  • The third step would be to remove jQuery Migrate dependency from the core.
  • Enabling SCRIPT_DEBUG constant in wp-config.php file can be helpful for debugging the compatibility issues due to the jQuery upgrades.

Actionable Steps:

  • If you are a website owner, then test your website’s functionality using Test jQuery Update and Enable jQuery Migrate Helper plugins, before updating to the latest version 5.5 or later.
  • If you are a developer, then make sure to test your plugins or themes and make sure that they are compatible with the versions of jQuery, jQuery Migrate and jQuery UI bundled with the latest version of WordPress.

References:

  • https://wptavern.com/major-jquery-changes-on-the-way-for-wordpress-5-5-and-beyond
  • https://wptavern.com/wordpress-5-6-will-ship-with-another-major-jquery-change

Leave a Comment

Your email address will not be published. Required fields are marked *