• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Damien Carbery - Website Development

Getting You Online & Keeping You There

Getting You Online & Keeping You There Get Started
  • Home
  • Services
  • Maintenance Plans
  • Portfolio
  • Blog
  • About Me
  • Contact
You are here: Home / Website Development / Set recovery mode email address

Set recovery mode email address

Published: August 24, 2020

Change the recovery mode email address to which the fatal error emails are sent to, instead of bothering and potentially confusing the site admin.

If you wish to send those fatal error recovery mode emails to someone other than the site administrator there is a filter for it.

Concerned site owner

A few weeks ago I was working on a client’s staging site. I had a typo in some new code that caused a 500 error. Due to the fatal error protection feature added in WordPress 5.2 I saw the “There has been a critical error on your website. Please check your site admin email inbox for instructions.” message and it sent an email to the site admin. Unfortunately the site admin was the site owner.

I fixed the error immediately but got a concerned email from the site owner the next day.

In order to avoid creating such concern I want to change the address that the email is sent to, without changing the site admin email address.

I searched around WordPress core code and found the function that creates and sends the email. This lead me to search the web for the ‘recovery_mode_email‘ filter and the first user contributed note shows how to change the email address – thanks Ulrich. Another note says that the code cannot be placed in the theme’s functions.php file and must be in a separate plugin and that is what the code below is.

The code

Related Posts

How to use my code snippets

My code snippets are presented as small, single file plugins that are easy to use - you just upload and activate.

Debugging – Figuring It Out Yourself

Learn how to investigate and fix front and back end WordPress issues. Use browser tools and the Query Monitor plugin to help locate the problem.

Active Multisite Plugins

List of active plugins on a Multisite installation.

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

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

Primary Sidebar

Blog Categories

  • Being Green
  • Food
  • Grammar
  • Just Strange
  • Laziness
  • Personal
  • Portfolio
  • Race Reports
  • Shudder
  • Typo
  • Website Development
  • WooCommerce Tips
  • Facebook
  • Twitter

Copyright © 2013–2023 Damien Carbery · Using Genesis Framework · Privacy Policy