WordPress JavaScript Errors: 'jQuery is not defined' and Broken Buttons or Sliders
Menus, sliders or forms stopped working. Read the console error and fix script order, minify and plugin conflicts.
Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
When buttons, sliders, menus or forms stop responding, JavaScript has failed somewhere on the page.
Step 1: Open the console
Press F12 and choose Console. Note the first red error and the file name. Errors after the first are often a result of it.
Step 2: "jQuery is not defined"
Something ran before WordPress loaded jQuery. Common causes:
- A minify, combine, defer or delay option in a caching or performance plugin. Turn it off or exclude jQuery.
- A theme or plugin that loads its own copy of jQuery incorrectly.
Step 3: Clear caches
Purge plugin, server and CDN caches, then hard-refresh with Ctrl+F5.
Step 4: Find the culprit
Deactivate plugins one by one. See our conflict guide.
Step 5: Check custom code
Code pasted into the theme or a header and footer plugin may have a typo that stops everything after it.
Step 6: Compare with a default theme
If the problem disappears, contact the theme's support with the console error text.
Related guides
- "The Uploaded File Exceeds the upload_max_filesize" in WordPress: Fix
- WordPress Update or Plugin Install Failed: 'Could Not Create Directory'
- A WordPress Update Broke My Site: How to Roll Back
- WordPress Stuck in "Briefly Unavailable for Scheduled Maintenance"
Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.