Removing the “Please Update Now” option from WordPress

With WordPress 3.2 out there are likely many people being prompted to upgrade automatically.  To see what I am talking about please have a look at the following screenshot…

Tempting isn’t it?  You might be asking where would the ability to hide the upgrade option be useful.  Well, if you develop and design websites using WordPress for clients what happens if they press this link and try to upgrade themselves?  Well I think you know where I am going here.  It gets messy trying to fix a mistake, repair a database and reverse it all.  Now lets talk about one possible solution that’s really easy to add to your WordPress website.  What you will need to do this is…

  1. Access to your WordPress website
  2. The ability to add a line of PHP code
  3. The following line of PHP…

//Remove the “Please Update Now” option from WordPress
add_filter( ‘pre_site_transient_update_core’, create_function( ‘$a’, “return null;” ) );

The next thing that you will need to do is navigate to your theme’s function.php file where you will add this code.  It will look similar to the following screen and you should be able to add this code almost anywhere in the function.php file…

What you will notice next is that the “Please Update Now” option for updating to the next version of WordPress is gone from the top of the page.  If you work with clients using WordPress this trick will help you control randomly updating WordPress.

Leave a Reply

Your email address will not be published. Required fields are marked *

This blog is kept spam free by WP-SpamFree.