Title: Forcing newer jQuery
Last modified: August 20, 2016

---

# Forcing newer jQuery

 *  Resolved [brettmeyer](https://wordpress.org/support/users/brettmeyer/)
 * (@brettmeyer)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/forcing-newer-jquery/)
 * I’m hitting a brick wall with this one. I’m trying to use a newer version of 
   jQuery (1.7.1) by unloading and reloading the script with this code, in my theme’s
   functions.php file:
 *     ```
       function modify_jquery() {
       	if (!is_admin()) {
       		wp_deregister_script('jquery');
       		wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js', false, '1.7.1');
       		wp_enqueue_script('jquery');
           }
       }
       add_action('init', 'modify_jquery');
       ```
   
 * When I try this locally I can see in Firebug that the new version is loaded. 
   But when I upload to my server the default version is always loaded… Any idea
   of what I can try?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/forcing-newer-jquery/#post-3203063)
 * > I’m trying to use a newer version of jQuery (1.7.1)
 * That’s **older** than the version of jQuery bundled with WordPress core. Never,
   ever, de-register core jQuery. It causes all kinds of problems.
 *  Thread Starter [brettmeyer](https://wordpress.org/support/users/brettmeyer/)
 * (@brettmeyer)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/forcing-newer-jquery/#post-3203069)
 * Ah, thanks mate that put me on the right track knowing the default was higher.
   Seems that some other bloody plugin was loading an older version.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/forcing-newer-jquery/#post-3203072)
 * Where did you download the bad plugin from?
 *  Thread Starter [brettmeyer](https://wordpress.org/support/users/brettmeyer/)
 * (@brettmeyer)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/forcing-newer-jquery/#post-3203074)
 * Was trying to find a decent image gallery slider. Got them off this site. Think
   it’s time to make my own though, the ones I tried are crap and I need something
   very basic.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/forcing-newer-jquery/#post-3203078)
 * Have you had a look through the [existing gallery plugins here](http://wordpress.org/extend/plugins/search.php?q=gallery)?
   Maybe you could use something like [http://wordpress.org/extend/plugins/lazyest-gallery/](http://wordpress.org/extend/plugins/lazyest-gallery/)
   as a starting point and hack it to suit your needs? Beats re-inventing the wheel.
 *  Thread Starter [brettmeyer](https://wordpress.org/support/users/brettmeyer/)
 * (@brettmeyer)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/forcing-newer-jquery/#post-3203111)
 * Thanks, I’ll take a look at that one.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Forcing newer jQuery’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [brettmeyer](https://wordpress.org/support/users/brettmeyer/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/forcing-newer-jquery/#post-3203111)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
