Disable WordPress maintenance nag

In case of a WordPress multisite with a specific setup trying to run autoupdates, you could add the following to prevent the WordPress autoupdates:

[php]
define( ‘WP_AUTO_UPDATE_CORE’, false );
[/php]

Hiding the automatic update messages in dashboard for site users and single site admins, you could disable the nag actions:

[php]
add_action( ‘admin_init’, ‘dx_prevent_notifications’ );

function dx_prevent_notifications() {
if ( !current_user_can( ‘edit_users’ ) ) {
remove_action( ‘admin_notices’, ‘maintenance_nag’ );
remove_action( ‘network_admin_notices’, ‘maintenance_nag’ );
}
}
[/php]


My name is Mario Peshev, a global SME Business Advisor running digital businesses for 20 the past years.

Born in Bulgaria, Europe, I gained diverse management experience through my training work across Europe, North America, and the Arab world. With 10,000+ hours in consulting and training for organizations like SAP, VMware, CERN, I’ve dedicated a huge amount of my time to helping hundreds of SMEs growing in different stages of the business lifecycle.

My martech agency DevriX grew past 50 people and ranks as a top 10 WordPress global agency and Growth Blueprint, my advisory firm, has served 400+ SME founders and executives with monthly ongoing strategy sessions.


Follow me at:

Latest Editions:

Browse by Category

Latest Answers: