Post Pic

How to: Disable the “please update now” message in WP dashboard

When a new version of WordPress is available, a message asking you to update your WP installation is displayed on your dashboard. Even if you better update, sometimes you may want to hide this message. Here is how to do it.

To get rid of the "Please update now" message in your WordPress dashboard, simply paste the following code on your functions.php file.

if ( !current_user_can( 'edit_users' ) ) {
  add_action( 'init', create_function( '$a', "remove_action( 'init', 'wp_version_check' );" ), 2 );
  add_filter( 'pre_option_update_core', create_function( '$a', "return null;" ) );
}

Thanks to Joost de Valk for this great code snippet!

28 Responses

Feb 23 2009 14:21

Thanks for the tip. However, your code is missing a the closing right curly bracket “}”.

For some reason it still does not work in version 2.7.

Feb 24 2009 13:24

This isn’t working in WordPress v2.6.3 … Does anybody know the solution?

Feb 24 2009 17:23

It’s a nice snippet. But it will be better if somebody can make it into a plugin so that non-technical person can enjoy it.

Feb 25 2009 00:12

Very useful tip, as that update massage knows to be very annoying and boring if you sometimes don’t have time to do the update right away.

Feb 25 2009 09:22

I think there is a default plugin for the same.

Feb 25 2009 14:36

This is a very nice website, with useful tips, but since it has been pointed out by a few people that your advice does not work correctly it would be good if you modified it or explained why it does not work.

Feb 26 2009 14:21

Very useful tip, as that update massage knows to be very annoying and boring if you sometimes don’t have time to do the update right away.

Mar 05 2009 12:32

The update message is one of the most annoying things ever. Thanks for this tutorial I’ll have to disable it right away – it was driving me crazy!

Aug 19 2009 21:33

thanks but i doesn’t work for me

Sep 06 2009 03:38

Great Idea, but does not work in 2.8.4.

Sep 06 2009 09:24

@Guillemo: That’s possible, this post was published a while ago…

Sep 19 2009 17:49

For WP 2.8.x (functions.php):

if ( !current_user_can( ‘edit_users’ ) ) {

remove_action( ‘wp_version_check’, ‘wp_version_check’ );
remove_action( ‘admin_init’, ‘_maybe_update_core’ );
add_filter( ‘pre_transient_update_core’, create_function( ‘$a’, “return null;” ) );
}

Oct 22 2009 07:05

Tnx rotor, your code did the job!

Oct 27 2009 21:27

Thanks rotor,

That worked for me aswell (WP 2.8.4)

Just for everyone else:
If the snippet doesn’t work, then don’t forget to replace the curly apostophes ( ‘these’ and “these”) with normal ones (simple remove and re-type them) because WordPress’ comments converted them.
That’s the most likely reason the code didn’t work, and will work !

Nov 10 2009 16:58

How can we do it for the plugins page?

Dec 14 2009 04:30

I’ve been using the following code to get around this problem, and it fixes the concern that Jitendra had:
Code is as follows :

add_action(‘admin_menu’,'bhhidenag’);

function bhhidenag()
{
echo “ “;
}

Drop into your functions.php file, or create a little plugin and insert the code into there.

It works by hiding the nag using some CSS, so it works on all pages. I have no idea about how backward compatible it is, but it works for me.

Hoep this helps someone..

Bruce

Dec 14 2009 04:32

Oops it looks like the Javascript code was stripped out.. Here it is again

add_action(‘admin_menu’,'bhhidenag’);

function bhhidenag()
{
echo “[style type=\"text/css\"][!-- #update-nag { display: none; height:0px;} --> [/style]“;
}

Replace all [ with

Sorry about that..

Trackbacks:

Leave a Comment

* Name, Email, Comment are Required