Whether or not you’re a stranger to WordPress errors or now not, being met with “jQuery isn’t outlined” whilst running in your web site isn’t amusing. It may be a startling and complicated message to look. Thankfully, this can be a usual error that websites the use of jQuery would possibly revel in someday or every other.

In all probability your web site is down, and whilst you verify your browser console for mistakes, you notice “jQuery isn’t outlined.” Discovering the mistake is step one — so neatly achieved!

Your next step is to unravel it. As a result of this is among the more uncomplicated JavaScript mistakes to mend, it shouldn’t take you very lengthy in any respect.

On this put up, we’ll stroll you thru the whole lot you want to grasp to mend it rapid. That comes with what the mistake method, why it should have took place within the first position — all important data to forestall this mistake one day. After all, we’ll stroll you thru a couple of steps you’ll be able to take to unravel it.

Let’s dive in!

What Is the “jQuery Is Now not Outlined” Error?

The to hand console log in your browser is the place you’ll most likely uncover this mistake. But it surely’s now not extremely descriptive. What does “jQuery isn’t outlined” in truth imply?

In undeniable English, this mistake is attempting to let you know that one thing in your web site — could also be a plugin — calls for jQuery to serve as in your web site. For some explanation why, when the browser attempted to load the web site and known as for that individual jQuery, it used to be now not to be had.

This mistake can doubtlessly close down your web site to guests. As a result of more or less 78% of the websites on the internet run on jQuery, this can be a commonplace error to search out.

The Chrome dev tools console tab will read "jquery is not defined" in red

jQuery isn’t outlined” error within the console log.

frame a.novashare-ctt{show:block;background:#00abf0;margin:30px auto;padding:20px 20px 20px 15px;colour:#fff;text-decoration:none!essential;box-shadow:none!essential;-webkit-box-shadow:none!essential;-moz-box-shadow:none!essential;border:none;border-left:5px cast #00abf0}frame a.novashare-ctt:hover{colour:#fff;border-left:5px cast #008cc4}frame a.novashare-ctt:visited{colour:#fff}frame a.novashare-ctt *{pointer-events:none}frame a.novashare-ctt .novashare-ctt-tweet{show:block;font-size:18px;line-height:27px;margin-bottom:10px}frame a.novashare-ctt .novashare-ctt-cta-container{show:block;overflow:hidden}frame a.novashare-ctt .novashare-ctt-cta{waft:proper}frame a.novashare-ctt.novashare-ctt-cta-left .novashare-ctt-cta{waft:left}frame a.novashare-ctt .novashare-ctt-cta-text{font-size:16px;line-height:16px;vertical-align:center}frame a.novashare-ctt .novashare-ctt-cta-icon{margin-left:10px;show:inline-block;vertical-align:center}frame a.novashare-ctt .novashare-ctt-cta-icon svg{vertical-align:center;peak:18px}frame a.novashare-ctt.novashare-ctt-simple{background:0 0;padding:10px 0 10px 20px;colour:preliminary}frame a.novashare-ctt.novashare-ctt-simple-alt{background:#f9f9f9;padding:20px;colour:preliminary}frame a.novashare-ctt.novashare-ctt-simple-alt:hover,frame a.novashare-ctt.novashare-ctt-simple:hover{border-left:5px cast #008cc4}frame a.novashare-ctt.novashare-ctt-simple .novashare-ctt-cta,frame a.novashare-ctt.novashare-ctt-simple-alt .novashare-ctt-cta{colour:#00abf0}frame a.novashare-ctt.novashare-ctt-simple-alt:hover .novashare-ctt-cta,frame a.novashare-ctt.novashare-ctt-simple:hover .novashare-ctt-cta{colour:#008cc4}Whether you’re a stranger to WordPress errors or not, being met with “jQuery is not defined” while working on your website is never fun. 😫 Learn how to fix it here! ⬇Click to Tweet

Possible Reasons of the “jQuery Is Now not Outlined” Error

This mistake may also be fairly a marvel. Your web site used to be running simply tremendous the day prior to this — what took place? This could be somewhat of a head-scratcher.

There are a couple of imaginable issues that may have took place that threw the “jQuery isn’t outlined” error:

  1. Outdated plugins put in in your WordPress web site are conflicting with ones that you simply put in and activated extra not too long ago. Should you recently installed or activated new plugins or one of the most plugins in your web site have now not been up to date not too long ago, this can be the motive.
  2. A slow or poor-performing hosting environment may just build up the period of time it takes your jQuery to accomplish when known as. Double-check your server assets or error log to substantiate this.
  3. The JavaScript in your web site is working ahead of the jQuery is totally loaded. Or in all probability a JavaScript report isn’t being as it should be loaded when the web page rather a lot.
  4. The CDN that you’re using to toughen your web site efficiency used to be not able to succeed in your server. Should you’re now not the use of a CDN in any respect, you’ll be able to rule out this risk fully.
  5. There’s an error or typo to your model of jQuery. In all probability any person not too long ago edited a core report or a plugin, which has now led to a war.

How To Repair the “jQuery Is Now not Outlined” Error

Sooner than we dive into the repair, take note to make a backup of your website ahead of enhancing code! Even probably the most seasoned builders make errors every now and then, and having a backup available will save you you from dropping any essential paintings as you troubleshoot.

In case you have the choice, unravel the mistake on a staging or construction web site first, as Kinsta shoppers do, then ascertain the repair and push those changes live.

While you’ve taken the ones important precautions, it’s time to mend that error.

Resolving this mistake takes some familiarity with including, doing away with, and enhancing code. Don’t concern — you received’t wish to write any code from scratch. However it might assist in the event you have been ready to get right of entry to your web site’s code, both through SFTP or thru your website hosting setting.

It’s now not excellent for enhancing code during the WordPress dashboard code editor. Should you don’t have already got a good text editor to hand, now’s the time to put in one.

Listed here are a couple of choices you’ll be able to make the most of to unravel this mistake and get your web site again as much as guests.

Approach 1: Use the Community Tab to Debug if jQuery Is Loading

Take a look at the Community tab of your browser’s dev equipment to look if jQuery is being loaded. This offers you one position to discover a fast validation.

The other is having a look thru more than one plugins and themes that may be inflicting the mistake. Cross during the code of your web site and be sure that jQuery is integrated. It could be highest in the event you simplest loaded it as soon as.

If the jQuery library isn’t integrated, upload it in your wp_enqueue_script() serve as with the next snippet:

Signal Up For the E-newsletter

wp_enqueue_script( 'tt-mobile-menu', get_template_directory_uri() .
'/js/mobile-menu.js', array('jQuery'), '1.0', true );

Find this code by means of going to the wp-includes folder, then open the script-loader.php report. If this doesn’t paintings, or in the event you in finding that the jQuery library is, in reality, already integrated, transfer directly to the next way.

Snippet can be pasted into any FTP editor, so long as it's in the script-loader.php file.

How your snippet will glance within the script-loader.php report.

Approach 2: Make Certain jQuery Is Loaded

Chances are you’ll revel in the “jQuery isn’t outlined error” when jQuery is integrated however now not loaded. Be sure that it’s loaded by means of discovering the script supply and pasting the URL in a brand new browser or tab.

As an example, if the