WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been trying to deregister the wordpress native jquery and use my version that i have downloaded.At first everything was working fine with the wordpress resident jquery albeit replacing $ with jQuery in my custom.js script.

I am using media-uploader in my theme and i added the scripts using this code;

function wptuts_options_enqueue_scripts() {
    wp_register_script( 'wptuts-upload', get_template_directory_uri() .'/admin/js/mlimage.js', array('jquery','media-upload','thickbox') ); 




add_action('admin_enqueue_scripts', 'wptuts_options_enqueue_scripts');

I have this code to add my custom jquery

function en_jquery()  
        wp_deregister_script( 'jquery' );   
        wp_register_script( 'daskustomjquery', get_template_directory_uri() . '/admin/js/jquery-1.7.2.min.js' );    
        wp_enqueue_script( 'daskustomjquery' );         
    add_action( 'admin_enqueue_scripts', 'en_jquery' );

Whenever i try excluding jquery from this line's array,wp_register_script( 'wptuts-upload', get_template_directory_uri() .'/admin/js/mlimage.js', array('jquery','media-upload','thickbox') );

none of the scripts get loaded.Is it possible to exclude the wordpress jquery and use the jquery-1.7.2.min i have downloaded?.

share|improve this question
up vote 3 down vote accepted

Your specific issue is that you are registering custom jQuery version to different handle ('daskustomjquery') and naturally that breaks things.

But please note that interfering with jQuery in admin is extremely not recommended.

share|improve this answer
Thanks for the tip.I am trying to submit a form + the submit button value using the jquery malsup form plugin.It works with jquery-1.7.2.min(a simple html file with jquery and the plugin) but fails to submit the submit button value with the wordpress jquery. – Gandalf Aug 19 '12 at 21:26
@flapjack jQuery 1.7.2 is the version WP currently includes, whatever your issue it's probably not because of the version. – Rarst Aug 19 '12 at 21:31
Oh wow,i didn't know that.I shall look at my code harder and see what is amiss.Thanks. – Gandalf Aug 19 '12 at 21:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.