Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Upgrade jQuery to Latest Version in WordPress

At WPBeginner, we’re serious about keeping our website visitors safe and secure. While often overlooked, keeping jQuery up to date is crucial for a website’s security and functionality.

When educating our readers about website security, we can’t emphasize enough the importance of timely updates. Outdated jQuery versions can lead to vulnerabilities, compatibility issues with themes and plugins, and even site crashes.

In this article, we’ll show you how to update jQuery to the latest version in WordPress, ensuring your site remains stable, secure, and performing at its best.

How to Upgrade jQuery to Latest Version in WordPress

Why Upgrade jQuery to the Latest Version in WordPress?

Your WordPress website, as well as many plugins and themes you use, relies on JavaScript in combination with jQuery to create fast, interactive, and engaging features.

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.4 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 won’t automatically update to the latest version.

Editor’s Note: 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.

With that being said, let’s take a look at how to upgrade jQuery to the latest version in WordPress. Here’s what we’ll cover in this tutorial:

How to Determine if Your Version of jQuery Is Out of Date

You can easily find the version of jQuery your website is running using the JavaScript console in your web browser.

First, you will need to visit your website and then open the JavaScript console. If you are using Google Chrome, then you can do this by selecting View » Developer » JavaScript Console from the menu.

Next, you should paste the following command into the console:

jQuery.fn.jquery

This command will display the version of jQuery your website is running.

Discover the Version of jQuery Your Website Is Running

You should hopefully see version 3.5.1 or higher. If your website is running a version that starts with 1.7 or lower, then you should definitely upgrade.

Method 1: 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.

Method 2: 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.

Choose the Version of jQuery You Wish to Run

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.

Expert Guides on WordPress Updates

Now that you know how to update jQuery, you may like to see some articles related to other updates you need to perform in WordPress.

We hope this tutorial helped you learn how to update jQuery to the latest version in WordPress. You may also want to see our guide on how to increase your blog traffic or our list of the most common WordPress errors and how to fix them.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

2 CommentsLeave a Reply

  1. Syed Balkhi

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk

    Thank you for the excellent guide. Following your advice, I checked all my websites using Google Chrome to make sure everything was in order. Fortunately, all my versions were up to date, so I was able to confirm that there were no issues on my sites and no updates were needed. This is good to know.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.