Email PHP Beginner

Stop Plugin and Theme Auto-Update Emails

Stop the emails WordPress sends after plugins and themes update automatically, and only get core update emails when something fails.

Tested on WordPress 7.1 PHP 8.3 No plugin needed Updated
functions.php 7 lines
add_filter( 'auto_plugin_update_send_email', '__return_false' );
add_filter( 'auto_theme_update_send_email', '__return_false' );

// Core updates: only email when an update fails or needs attention.
add_filter( 'auto_core_update_send_email', function ( bool $send, string $type ): bool {
	return 'success' === $type ? false : $send;
}, 10, 2 );

Where to add this

Recommended A code snippets plugin Survives theme changes and is easy to switch off.
Child theme At the end of your child theme's functions.php file.
Must-use plugin As a .php file in wp-content/mu-plugins, starting with <?php.

Always add PHP to a staging site first, or have FTP or file manager access ready, so you can undo it if something goes wrong.

With auto-updates turned on, WordPress emails you after every update run. If you manage many sites, that’s a lot of “Some plugins were automatically updated” emails. This snippet keeps only the ones that need action.

How it works

auto_plugin_update_send_email and auto_theme_update_send_email control the plugin and theme summaries. Returning false stops them, including the emails about failed updates, so check Site Health or a monitoring tool instead.

For WordPress core, auto_core_update_send_email receives the type of email. The snippet blocks 'success' only, so you still hear about failures and critical problems.

Things to watch

  • Updates still run. You just aren’t emailed about them.
  • To keep emails about failed plugin updates, return true only when the second argument contains failed updates.

How to test it

Wait for the next auto-update, or trigger one with wp cron event run wp_version_check. No summary email should arrive.

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only