Last Updated on July 18, 2022 by Oluwatuyi
Do you want to Upgrade jQuery to Latest Version in WordPress
Your theme and plugins, as well as WordPress itself, rely on jQuery. An out of date version may place your website at risk.
So, we’ll show you how to update jQuery to the latest version in WordPress.
Why Upgrade jQuery to Latest Version in WordPress?
It’s important to keep jQuery up to date to maintain the security of your website. The latest version fixes bugs and vulnerabilities in previous versions that may place your site at risk.
If you are running the latest version of WordPress, then you don’t need to manually update jQuery. It’s automatically done for you. But if you’re using an older version of WordPress such as WordPress 5.9 or earlier, then it’s recommended that you do the update.
Also, if you’ve replaced the default WordPress jQuery with Google Library, then it wouldn’t automatically update to the latest version.
Note that it’s important to highlight that updating jQuery may break older plugin functionality, so after the update, you should test your website. In most cases, it’s not an issue, but in case you run into problems, then you can easily return to the older version.
How to Determine if Your Version of jQuery Is Out of Date
Next, you should paste the following command into the console:
This command will display the version of jQuery your website is running.
You should hopefully see version 3.3.2 or higher. If your website is running a version that starts with 1.7 or lower, then you should definitely upgrade.
How to Upgrade jQuery to Latest Version in WordPress
Upgrade jQuery to the Latest Stable Version
The jQuery Updater plugin updates jQuery to the latest official stable version. This is likely to be more current than the version that comes with WordPress.
First, you need to install and activate the jQuery Updater plugin. For more details, see our step by step guide on how to install a WordPress plugin.
Upon activation, your website will start running the latest version of jQuery. However, before you see the change, you may need to clear your browser cache and WordPress cache.
The plugin includes the jQuery Migrate script to help with backward compatibility. However, if you find that you have trouble with some of your plugins, then you can simply deactivate the jQuery Updater plugin to return your site to its original state.
Control the Version of jQuery That Is Run on Your Website
The Version Control for jQuery plugin allows you to control the version of jQuery that is run on your website. This allows WordPress users to run a stable WordPress website, and WordPress developers can check if their code works with various versions of jQuery.
To get started, you need to install and activate the jQuery Updater plugin. If you need help, then see our step by step guide on how to install a WordPress plugin.
Upon activation, the plugin will default to the latest pre-release version of jQuery. It also installs the jQuery Migrate script to help with backward compatibility.
If you need to, you can select a different version of jQuery by visiting the Settings » jQuery Version Control page.
From here, you can select the jQuery and jQuery Migrate versions you wish to run on your site. Make sure you click the ‘Save Changes’ button to store your settings.
If the updated version of jQuery breaks some of your older plugins, then you can simply select an earlier version from the drop down menu. Alternatively, if you deactivate the Version Control for jQuery plugin, then your site will return to its original state.
We hope this tutorial helped you learn how to update jQuery to the latest version in WordPress. You may also want to learn how to check your blog traffic.
If you have any issue on this, you can use our comment session or join our delegate on facebook to solve any issues related to WordPress and subscribe to our YouTube Channel for WordPress video tutorials.