How to Remove WordPress Update Notification Except for Admin

Snippets by IsItWP

Would you like to remove the annoying WordPress update notification for all users, except for admins? Regular WordPress users couldn’t update WordPress, so showing them the update message can be annoying and unnecessary. Let’s take a look at how to remove the WordPress update notification for everybody but the admins.


All you have to do is add this code to your theme’s functions.php file or in a site-specific plugin:

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

Or, alternatively you can hide the update message with CSS. This snippet will hide the update message for all users using CSS. Add this code to your theme’s functions.php file or in a site-specific plugin:

function remove_upgrade_nag() {
   echo '<style type="text/css">
           .update-nag {display: none}
add_action('admin_head', 'remove_upgrade_nag');

Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly copy / paste code snippets in WordPress, so you don’t accidentally break your site.

If you liked this code snippet, please consider checking out our other articles on the site like: 62 best free WordPress blog themes or 7 best WordPress contact form plugins.

Comments  Leave a Reply

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our privacy policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

WordPress Launch Checklist

The Ultimate WordPress Launch Checklist

We've compiled all the essential checklist items for your next WordPress website launch into one handy ebook.
Yes, Send Me the Free eBook!