Disable new site creation email notifications for WordPress multisite

In multisite, WordPress 3.0.5 will send new site creation email notifications to the site admin by default. There’s also no super admin option to disable them. Fortunately, a short code snippet in /wp-content/mu-plugins/ achieves the same effect:

function db_remove_new_site_notification_email( $blog_id, $user_id, $password, $title, $meta ) {
return false;
}
add_filter( 'wpmu_welcome_notification', 'db_remove_new_site_notification_email' );

Behind the scenes, we’re hijacking a filter in wpmu_welcome_notification() to invalidate the method and disable the email. With this approach, the option to email the network administrator is still functional.

3 Comments

Jason Pelker January 11, 2012 Reply

Do you have a good suggestion on how to disable emails to the new subsite admins (not the super admin)? Thank you in advance.

Daniel Bachhuber January 12, 2012 Reply

The snippet in the post should disable emails to the subsite admins, while still sending it to the super admin if you’d like. Is it not working for you?

Todd February 23, 2012 Reply

I had a small adjustment to make which is that I was getting errors until I changed the following like
add_filter( ‘wpmu_welcome_notification’, ‘db_remove_new_site_notification_email’ );

to

add_filter( ‘wpmu_welcome_notification’, ‘db_remove_new_site_notification_email’,10,5 );

After that it worked like a charm!

Leave a Reply