Hiding Notifications of New WordPress Version in Admin Panel
In this note, we will consider how to remove (disable) visual notifications about updates.
When a new version of WP appears, notifications appear throughout the admin panel that an update is needed. Sometimes, such notifications need to be removed, while leaving the update check itself and the ability to update, for example, through the wp core update command.
We also recommend disabling aggressive WordPress updates and speeding up the admin panel!
Where Notifications are Displayed
To understand what is being discussed, let's see where notifications of the new version are displayed.
"WordPress X.X Available" in the Console
"Download Version X.X" in the footer
Plugin update counter in the admin menu
Total update counter in the admin menu (engine + themes + plugins + translations)
Total update counter in the admin bar (engine + themes + plugins + translations)
"Update to X.X" in the "At a Glance" widget in the Console
Code to Hide Notifications
<?php // Hide notifications of new WordPress version if ( 1 ) { // Total update counter in the admin bar add_action( 'admin_bar_menu', function ( $wp_adminbar ) { $wp_adminbar->remove_node( 'updates' ); }, 999 ); add_action( 'admin_menu', function () { // "WordPress X.X Available" in the Console - For Single installation remove_action( 'admin_notices', 'update_nag', 3 ); // "WordPress X.X Available" in the Console - For Multisite installation remove_action( 'network_admin_notices', 'update_nag', 3 ); // "Download Version X.X" in the footer remove_action( 'update_footer', 'core_update_footer' ); // Total update counter in the admin menu remove_submenu_page( 'index.php', 'update-core.php' ); // Plugin update counter in the admin menu $GLOBALS['menu'][65][0] = __( 'Plugins' ); }, 999 ); // "Update to X.X" in the "At a Glance" widget in the Console add_action( 'admin_head-index.php', function () { ?> <style> #wp-version-message .button { display: none; } </style> <?php } ); }
Insert the code into the functions.php file of the theme.