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]


Mario Peshev is a 5x CEO and operator, founder of DevriX and Growth Shuttle, global value creation advisor, angel investor, and author of “MBA Disrupted.”

His original background in engineering rode the wave of IT entrepreneurship in the last 25 years, from product and service entrepreneurship through acquiring and selling businesses, to investing in global startups like beehiiv, doola, the Stacked Marketer, Alcatraz, SeedBlink.

Peshev spent over 10,000 hours in consulting and training contracts for mid-market and enterprise organizations like VMware, SAP, Software AG, CERN, Saudi Aramco since 2006. His books and guides are referenced in over 50 universities in North America, Europe, and Asia.


Follow Mario on social:

Latest Editions:

Latest Answers: