Menu
Disclosure: ULTIDA's content is free & reader-supported. We may earn a commission if you click & buy through our links. Your support helps us create the best content & make a difference.
Tutorials

How To Upgrade jQuery To Latest Version In WordPress

upgrade jquery to latest version in wordpress

Do you want to upgrade jQuery to the latest version in WordPress?

JavaScript library named jQuery is an important part of your WordPress website.

It runs in the background and takes care of several processes and IMPORTANT functions.

Fortunately, most users will never have to dive deep into it because it doesn’t cause any issues.

Sometimes, your WordPress can have a different version of jQuery than your theme and plugins.

And that can cause your website to break.

Why Upgrade jQuery To The Latest Version In WordPress?

WordPress comes with jQuery by default.

You can run into a problem if a WordPress theme you just installed runs on a newer version of jQuery than your WordPress installation.

The most important reason to always keep jQuery up to date is SECURITY.

If you keep it outdated, your website is vulnerable to attacks.

But don’t worry, updating jQuery on your WordPress website is a quick and straightforward process.

How do you know you are using the latest jQuery version?

You can check whether you are running the latest jQuery version with the inspect button in your browser.

Start by right-clicking anywhere on the page and clicking Inspect.

I usually use Google Chrome, which has the most options and is the most user-friendly.

google chrome inspect

A popup window will open after you click the Inspect button. Now click the Console button and then the “eye” icon.

Under the expression label, write the following command:

jQuery.fn.jquery

google chrome javascript console

You can now see which version your website is using.

Our website (ULTIDA) uses version 3.6, the latest version, and there is no need for an upgrade.

If you are running version 1.7 or lower, then an upgrade is a must as your site is compromised and can be easily hacked.

How To Update jQuery In WordPress

Like always, the easiest way to update jQuery is with the help of a WordPress plugin.

Please read our tutorial if you need HELP installing and activating WordPress plugins.

Proceed and install jQuery Updater from the WordPress repository.

The plugin will automatically update jQuery to the latest version.

Repeat the step we described above to check if it’s properly updated.

If you are still seeing the old version, you might need to clear your cache first and then check again. (We also have the most complete WordPress caching plugins collection ready for you.)

It is recommended to check your website for any ERRORS after the update thoroughly.

While you should always run the latest version, some of the plugins or the theme might not yet be compatible with it.

If that is the case, simply deactivate the jQuery Updater plugin and your website will GO BACK to the previous version.

Why Can jQuery Cause Problems With Your WordPress Website?

Conflicts between different versions that plugins and themes use can cause serious issues on your website.

WordPress 5.5 was released in 2020 and it caused NUMEROUS problems with themes and plugins.

Several critical issues caused websites to break.

The biggest issue came from the decision to remove jQuery Migrate.

While this was a GOOD decision for the long term, many plugins and themes were just not prepared yet.

Users had to install Enable jQuery Migrate Helper to resolve the issue and some websites still use it today.

Frequently Asked Questions

If you are in a hurry, we prepared a short FAQ section to help you out.

What is jQuery?

jQuery is a JavaScript library that simplifies HTML manipulation, as well as event handling, CSS animation, and Ajax calls.

It’s a breakthrough technology that eases your WordPress website’s writing and running scripts.

It saves a lot of time for front-end developers as it has a lot of scripts and plugins that you can use, so you don’t have to create them yourself.

How do I add a simple jQuery script to WordPress?

This is only for advanced users. Do not proceed with it if you are not very comfortable with editing PHP and js files.

The process is as:

  • First, write your script
  • Start your FTP client
  • Connect to your website
  • Go to folder names “js”
  • Create a file in that folder for your script
  • Add your jQuery script to that file

Does WordPress still support jQuery?

Yes, and that probably won’t change for a long time.

It’s a time-saver for front-end developers and is very easy to implement and use.

Is WordPress moving away from jQuery?

Not soon. While jQuery is used less in other frameworks and libraries (GitHub.com removed it in 2018), WordPress still uses it and will keep using it for a long time.

The reason is in the themes and plugins, as most still use jQuery and if WordPress removes jQuery, then all of these plugins and themes would become obsolete.

Is jQuery necessary for WordPress?

While it is true that you don’t need jQuery for a lot of your theme and plugin features, jQuery is still commonly used in a lot of advanced scripts.

7 out of 11 default WordPress themes (Twenty Nineteen, Twenty Twenty, Twenty Twenty-One, etc.) are still using it in the front-end.

jQuery will definitely be used less in the future, but it’s still an integral part of WordPress today.

And that’s why you should check from time to time if you have the latest version.

Just to skip the unnecessary problems that are easily avoidable.

No Comments

    Leave a Reply