Whenever there’s a new release, it’s highly recommended that you update your version of WordPress as soon as possible, so you are always running the latest security updates.
The only problem is, if you’re updating a live site you don’t know what effect the updated core code may have on your site. With each release of WordPress, the core team work on improving the code, which means old functions can be removed.
If you have themes or plugins that use deprecated functions, upgrading WordPress can break your site. This is why it’s a good idea to have a development site that mirrors your live site where you can test new WordPress releases.
The WordPress update notification is shown to all users who log into the backend, but the message is different depending on your role. Only admins are able to update the core code. Other users will get a message which says a new version of WordPress is available and to contact the site admin.
Simply add the following code to your functions.php, or use it to create a new plugin:
function hide_update_notice_to_all_but_admin_users()
{
if (!current_user_can('update_core')) {
remove_action( 'admin_notices', 'update_nag', 3 );
}
}
add_action( 'admin_head', 'hide_update_notice_to_all_but_admin_users', 1 );
Next time subscribers log in, WordPress will no longer display the update nag:
The notification will continue to display for admins, so you’ll always know when there’s a new version of WordPress available to download.