How to Hide the WordPress Update Notification To All But Admins

How to Hide the WordPress Update Notification To All But Admins

One of the great things about WordPress as an open source project is that the core code is regularly updated with improvements and security patches.

Major releases, along with minor security releases, of WordPress are usually shipped two or three times a year. If you have automatic updates turned on, your WordPress install will be updated each time there’s a minor release. However, you will need to manually update your software for major releases.

Whenever there’s a major release available, a notification will display at the top of your admin area, letting you know your version is out-of-date and you need to update the core code.

For many people, this nag can be annoying. And if you developer websites for clients, you may want to hide it. After all, who wants to let their clients know their software is old?

In today’s Weekend WordPress Project, I’ll show you how to easily hide the update notifications.

Update notification
Find out how to hide the update notification.

It’s Important to Update WordPress

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.

Notify admin
The backend of WordPress for subscribers.

Hiding the Update Notification

Developer Paul Underwood has a handy snippet for hiding the notification. 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:

No nag
The update notification has magically disappeared!

The notification will continue to display for admins, so you’ll always know when there’s a new version of WordPress available to download.

Admin update
Admins will still new when newer versions of WordPress are available.