WordPress Quick Tip: Remove The Dashboard Update Message

update200x200 A particularly useful function of WordPress is that it informs you when a new update is available to download. This is displayed at the top of your WordPress admin panel and provides a link to the update page where you can automatically install the new available version.

Updating your WordPress installation is important because the latest version will likely contain security updates and will give you access to any new functionality that has been developed.

However, there are occasions where you might not want this message to displayed – for example, if you’re building a WordPress site for a client, you might want to remove the message to stop them from updating the site themselves.

update

This is because sometimes it’s best to initially test the effects of a new WordPress update locally to ensure that it doesn’t cause the site any problems – it’s not unusual to have configuration issues with plugins that cause the website not to display or work properly.

Removing the update message is very straightforward to do – simply add the following lines of code to your functions.php file:

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;"));



With wordpress 3.x, we should be using an other way:


go to: wp-admin/includes/update.php


Search:


add_action( 'admin_notices', 'update_nag', 3 );

Replace to:


//add_action( 'admin_notices', 'update_nag', 3 );



Then check your WordPress admin panel and you should see that the message has disappeared.


Whilst this removes the update message, please make sure that you still update to the latest version when it becomes available. Not doing so can leave you vulnerable to security risks, so make sure you’re aware of when new versions are released and ensure that you apply the update.


I hope you found this tip helpful – let me know if you have any questions or comments.


2010 WEBSITE20. All rights reserved.