How To Redirect Automatic Update Email Notifications In WordPress

One of the biggest features to land in WordPress 3.7 were automatic updates. When automatic updates are completed, an email notification is sent to the address specified within Settings > General which is typically the website administrator. However, if you maintain websites for clients, you probably want those notifications to be forwarded to you and not the client. Since other events are tied to the email address such as new user registrations, you can’t substitute the address with your own.

After activating the plugin, you’ll find the notification email address located in Settings > Update Notifications. Place the email address where update notifications will go into the field, save the changes and wait for a security or maintenance release of WordPress.

Filters and Hooks Are A Plugin Authors Best Friend

I asked Phil, how was he able to redirect update notifications without affecting the other administrative emails generated by WordPress. I also asked him why they created the plugin. His response:

In terms of how we redirect only the background update emails, WordPress provides us with a handy filter (auto_core_update_email and auto_core_update_send_email) we hook into in order to replace the email address. The filter only fires during an automatic background update and so all other WordPress emails are unaffected.

Background updates are a valuable feature of WordPress, ensuring sites receive bug/security fixes quickly. There are a number of plugins which control background update behaviour. However, to my knowledge there are no plugins which redirect the email notifications.

Phil suggests if a number of client sites are under your control to create a set of email rules to help organize the notifications.

I’ve got this plugin setup in conjunction with a few email rules. Success notifications are archived and failed updates flagged for manual assessment.

Great Plugin With One Drawback

The only drawback I see is the possibility of clients deactivating the plugin, preventing the email from reaching its intended target. Outside of that, this plugin is a neat example of how the presence of filters and hooks in WordPress give plugin authors the opportunity to bend WordPress to their will.

Who is Jeff Chandler

Jeff Chandler is a WordPress guy in the buckeye state. Contributing writer for WPTavern. Have been writing about WordPress since 2007. Host of the WordPress Weekly Podcast.

I love simple plugins like this. Glad the hooks in place make this so easy — background updates were one of the most immediately extensible features we’ve launched in a while. Dion and I agonized over each hook.