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.

Plugin Header
Plugin Header

A new WordPress plugin called Background Update Notification Email Address developed by Phil Wylie, Laura Vaquero, and Interactive Web Solutions solves the problem by changing the email address update notifications are sent to when an automatic background update is completed. By only changing the email address for automatic update notifications, clients are able to continue receiving emails related to administering their website.

Where Updates Will Go
Where Updates Will Go

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.

There are 3 comments

Comments are closed.