Send Fatal Error Emails to Your Developers
Sends WordPress's "your site is experiencing a technical issue" recovery emails to your developers instead of (or as well as) the site owner, so the right people can fix it.
Opens WPIDE on
Code
$wpide_recovery_devs = array(); // e.g. array( '[email protected]' ).
$wpide_recovery_keep_admin = true;
add_filter( 'recovery_mode_email', function ( $email ) use ( $wpide_recovery_devs, $wpide_recovery_keep_admin ) {
$devs = array_filter( $wpide_recovery_devs, 'is_email' );
if ( $devs ) {
$current = $wpide_recovery_keep_admin ? (array) $email['to'] : array();
$email['to'] = array_values( array_unique( array_merge( $current, $devs ) ) );
}
return $email;
} );
Notes
Add your developers' addresses at the top and set $wpide_recovery_keep_admin to false to stop the site owner receiving them; WordPress sends at most one such email per day.
How to add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.