Setting the Recovery Mode Email on Your Child Site

Recovery Mode Email on Your Child Site

WordPress 5.2 introduced a fatal error recovery mode. A fatal error on a site would have normally resulted in a white screen of death, where the front-end of the site is white and would be the result of a fatal error conflict being caused by the active theme or one of the active plugins. The fatal error would have caused the sites wp-admin not be loadable.

In WordPress 5.2, when a fatal error is detected, an email is sent to the admin email address listed on the site, but there is a constant that can be set in the child sites to use a specific email address to set the fatal error email to.

MainWP has the amazing code snippets extension, which can be used to set code snippets on all connected child sites.

The code snippet to set on the child sites would be;

define( 'RECOVERY_MODE_EMAIL', '[email protected]' );

Remember to change the example email address with the actual email address that you would want to use.

There is also a filter in WordPress core, now to set the recovery email address as well. The example code is;

add_filter( 'recovery_mode_email', function( $email_data ) {
    $email_data['to'] = '[email protected]';
    return $email_data;

Remember to change the example email address to the actual email address you want to use. With the correct email address set for the recovery email, you will be notified if one of the connected child sites has a fatal error, then you can take action to fix the issue on that specific site.

4 thoughts on “Setting the Recovery Mode Email on Your Child Site”

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Stay Connected with MainWP

Sign up here to receive latest MainWP News and Notifications

Get Started With MainWP Today!

Stop letting your sites manage you and start managing your sites.