{"id":46643,"date":"2026-10-10T17:17:34","date_gmt":"2026-10-10T17:17:34","guid":{"rendered":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/?p=46643"},"modified":"2026-10-10T17:17:34","modified_gmt":"2026-10-10T17:17:34","slug":"disable-wordpress-auto-update-emails","status":"publish","type":"post","link":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/disable-wordpress-auto-update-emails\/","title":{"rendered":"Disable WordPress Auto-Update Emails, Keep Failure Alerts"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">WordPress sends an email after every automatic update, for core, plugins and themes. With auto-updates turned on across several sites, those emails turn into noise, and the ones that matter, failed updates, get lost among them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This snippet disables the routine success emails and keeps the ones that need action: a failed or critical core update, and any plugin or theme update run where something did not install.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">The snippet<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">&lt;?php\nadd_filter( 'auto_core_update_send_email', 'dpc_core_update_email_on_failure_only', 10, 2 );\n\n\/**\n * Skip the \"your site has updated\" email, keep failure and critical emails.\n *\/\nfunction dpc_core_update_email_on_failure_only( $send, $type ) {\n\tif ( 'success' === $type ) {\n\t\treturn false;\n\t}\n\n\treturn $send;\n}\n\nadd_filter( 'auto_plugin_update_send_email', 'dpc_extension_update_email_on_failure_only', 10, 2 );\nadd_filter( 'auto_theme_update_send_email', 'dpc_extension_update_email_on_failure_only', 10, 2 );\n\n\/**\n * Send the plugin or theme update email only when at least one update failed.\n *\/\nfunction dpc_extension_update_email_on_failure_only( $enabled, $update_results ) {\n\tforeach ( (array) $update_results as $result ) {\n\t\tif ( isset( $result-&gt;result ) &amp;&amp; true !== $result-&gt;result ) {\n\t\t\treturn $enabled;\n\t\t}\n\t}\n\n\treturn false;\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Add it with Scripts Organizer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/dplugins.com\/downloads\/scripts-organizer\/\">Scripts Organizer<\/a> ships this snippet in its One-Click Import library. To add it by hand:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In wp-admin go to <strong>Scripts Organizer \u2192 Code Blocks \u2192 Add New<\/strong> and give the block a title.<\/li>\n\n\n<li><strong>Script location<\/strong>: PHP.<\/li>\n\n\n<li><strong>Trigger location<\/strong>: Everywhere. Automatic updates run from WP-Cron, which is neither a wp-admin screen nor a normal front-end page view, so Admin only and Conditions would miss it.<\/li>\n\n\n<li><strong>Action hook<\/strong>: leave it empty. The code only registers filters and actions, so it can run while plugins load.<\/li>\n\n\n<li>Paste the snippet into the PHP editor, enable the block and publish it.<\/li>\n\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">The same code also works unchanged in a small plugin or an mu-plugin file in <code>wp-content\/mu-plugins\/<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How it works<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>auto_core_update_send_email<\/code> receives the email type: <code>success<\/code>, <code>fail<\/code> or <code>critical<\/code>. The snippet returns <code>false<\/code> only for <code>success<\/code>. Emails about a manual update do not go through this filter at all.<\/li>\n\n\n<li><code>auto_plugin_update_send_email<\/code> and <code>auto_theme_update_send_email<\/code> receive the results of one update run. Each result has a <code>result<\/code> property that is <code>true<\/code> when that update worked. If every result is <code>true<\/code>, the email is dropped. If any update failed, the normal email goes out and lists the successes and failures together.<\/li>\n\n\n<li>Older copies of this snippet returned <code>false<\/code> on all three filters, which also silenced failure and critical emails, the ones you want to see.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Customise it<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To silence plugin and theme emails completely and keep only core failure emails, replace the two plugin and theme <code>add_filter()<\/code> lines with these:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">add_filter( 'auto_plugin_update_send_email', '__return_false' );\nadd_filter( 'auto_theme_update_send_email', '__return_false' );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To send update emails to another address than the site admin, filter <code>auto_core_update_email<\/code> and <code>auto_plugin_theme_update_email<\/code>. Both receive the email as an array with a <code>to<\/code> key.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Gotchas<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>On development and release candidate versions WordPress also sends a debug email after core updates. That one is controlled by <code>automatic_updates_send_debug_email<\/code>, not by these filters.<\/li>\n\n\n<li>If you get no email even when an update fails, check that the site can send mail at all; this snippet does not change delivery.<\/li>\n\n\n<li>To hear about security releases before they install, see <a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wordpress-security-updates-email-alert\/\">WordPress Security Updates Email Alert Without a Plugin<\/a>. To stop updates instead of emails, see <a href=\"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/disable-wordpress-core-plugins-and-themes-updates-and-admin-notices\/\">Disable WordPress Core, Plugins and Themes updates and Admin Notices<\/a>.<\/li>\n\n<\/ul>\n\n","protected":false},"excerpt":{"rendered":"<p>Stop the WordPress emails sent after successful automatic core, plugin and theme updates, but still get an email when an update fails.<\/p>\n","protected":false},"author":1,"featured_media":46644,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Disable WordPress Auto-Update Emails, Keep Failure Alerts","description":"Stop the WordPress emails sent after successful automatic core, plugin and theme updates, but still get an email when an update fails."},"_slim_seo_primary_term_category":0,"_slim_seo_primary_term_post_tag":0,"footnotes":""},"categories":[131,3],"tags":[192,193,167,95],"dpc_library":[204],"class_list":["post-46643","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-production","category-wordpress","tag-auto-updates","tag-email","tag-maintenance","tag-plugins"],"_links":{"self":[{"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/posts\/46643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/comments?post=46643"}],"version-history":[{"count":1,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/posts\/46643\/revisions"}],"predecessor-version":[{"id":46659,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/posts\/46643\/revisions\/46659"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/media\/46644"}],"wp:attachment":[{"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/media?parent=46643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/categories?post=46643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/tags?post=46643"},{"taxonomy":"dpc_library","embeddable":true,"href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/code.dplugins.com\/wp-json\/wp\/v2\/dpc_library?post=46643"}],"curies":[{"name":"wp","href":"https:\/\/summer-heart-0930.chufeiyun1688.workers.dev:443\/https\/api.w.org\/{rel}","templated":true}]}}