Ever since WordPress 5.5 you can now have your plugins and themes auto-update. This is a great feature to keep your site up to date and working properly. Especially if you have many sites you manage this is a welcomed feature. While this is a great feature if you manage a lot of sites the emails WordPress sends confirming automatic updates can become quite a lot.
Today I’ll show you how to disable the plugin/theme auto-update emails notifications using a plugin or PHP code snippet.
Additionally I’ll show you how to disable email notifications for core updates as well. If you’re unfamiliar with that email it looks like this.
First I’ll show you how to disable these emails using a WordPress plugin.
Disable WordPress Auto-Update Emails with Plugin
If you aren’t familiar with adding code to your site the plugin “Disable auto-update Email Notifications” is the easiest way to disable these emails.
This plugin simply disabled the WordPress 5.5 auto-update email notifications when active so there is no setup needed.
If you need to disable automatic core update emails as well you can use the Manage Notification E-mails plugin. This plugin offers more control over automatic emails on your site but requires some simple configuration.
Code Snippet to Disable Auto-Update Emails in WordPress
These code snippets can be used in your theme’s function.php file or added to your site using a plugin like code snippets.
Disable Auto Update Plugin and Theme Emails:
This code snippet will prevent WordPress from sending emails notifying you of theme or plugin auto updates.
<?php | |
//Disable plugin auto-update email notification | |
add_filter('auto_plugin_update_send_email', '__return_false'); | |
//Disable theme auto-update email notification | |
add_filter('auto_theme_update_send_email', '__return_false'); |
Disable Auto Update Core Emails:
Additionally if you also want to disable WordPress core update notification emails you can use the snippet below. These are the emails with “[Your Site] Your site has updated to…” in the subject line.
<?php | |
//Disable automatic "Your Site Has Been Updated..." emails | |
add_filter( 'auto_core_update_send_email', 'smartwp_disable_core_update_emails', 10, 4 ); | |
function smartwp_disable_core_update_emails( $send, $type, $core_update, $result ) { | |
if ( !empty($type) && $type == 'success' ) { | |
return false; | |
} | |
return true; | |
} |
Now that you’ve disabled automatic update email notifications in WordPress your inbox should be a little lighter. This can be a cumbersome email notification for anyone who manages a lot of sites. Just remember that the reason they have these emails is so you can test if your WordPress site broke with the updates. I will note that I have rarely seen a WordPress plugin update break a site at this point with an update.
15 Responses
Hey,
Should the snippet only run in administration area? Only on site front-end? Or should it run everywhere?
Thanks
I think you want to do ‘run everywhere’
Hi Andy
How would you apply this on a WP Network?
Thanks
Hey Arie, you should be able to use the code snippet to make a plugin and Network Activate it. Or use the plugin in the article and network activate it as well.
OK cool. Thanks!
Thanks for the simple instructions. I already had hundreds of wordpress alerts in Gmail in a few weeks, I had to look for a solution to limit it 🙂
Hi Andy,
Codes are cool, but where exactly shall I put them in? Will functions.php of the child theme make do?
Yup functions.php of a child theme should be perfect. Full video on how to add code snippets here https://www.youtube.com/watch?v=gmfE0A15vF8
Sweet, thanks!!
Syke, just got another automatic updates email. Code added to functions.php of the child theme. Any ideas? Thanks
Heads up:
Reason it was not working was that due to the snippet copy&paste the “wrong” apostrophes where used. So, just make sure ‘ is used, instead of '
Geez, the font you use here is confusing everything:
‘ is used, instead of ' !!!
wtf…
' ‘ !!!
I give up…
I include the correct apostrophes in the example code, browser might be modifying, but yes if you are pasting code you’ll want the simple ones Martin is mentioning. If you click “View Raw” on the code snippets it should output the correct ones I believe in the examples.