PHP, Wordpress

WordPress – Disabling automatic update email notification

Being the world’s current most used content management system, the good guys at WordPress doesn’t stop improving the system, we get new updates and fixes around 10 to 20 times a year. They were amazing but one thing that I find annoying is that I always get an email notification that my WordPress site has been automatically updated. For someone like me who maintains around 200+ small wordpress sites, this is a nightmare! Imagine waking up to hundreds of email one day with the same content.

Without much ado, here’s how you can disable the email notification for the automatic update. Just open your theme’s functions.php file and add this code at the bottom:

/* Disable admin notification - WordPress Update */

add_filter( 'auto_core_update_send_email', 'wpb_stop_auto_update_emails', 10, 4 );
  
function wpb_stop_update_emails( $send, $type, $core_update, $result ) {
	if ( ! empty( $type ) && $type == 'success' ) {
	return false;
	}
	return true;
}


Good bye nightmare emails! 🙂