Disable WordPress 5.2 PHP error email

Maybe you developed a WordPress website years ago and today, years later, your client has started receiving emails that inform him of PHP errors. This is due to the new “site health” feature that, since WordPress version 5.2, sends an email every time a PHP error is detected.

If you want these emails not to be sent, or you want to receive them instead of the email address set as the main address in the WordPress admin, place these filters in the functions.php file of your theme or in your own plugin:

Disable WordPress PHP fatal error email sending:

I have not really seen a way to do it, but it is possible to modify the time lapse that must elapse between one email and another. So we can put an absurd figure and it is solved.


add_filter( 'recovery_mode_email_rate_limit', 'recovery_mail_infinite_rate_limit' );
function recovery_mail_infinite_rate_limit( $rate ) {
return 100 * YEAR_IN_SECONDS;
}

 

Change the recipient of the WordPress PHP fatal error email:

I think it’s the most useful. In this way you can get the mail to you instead of your client, and so the client is not scared and you are informed of the health of the site.


add_filter( 'recovery_mode_email', 'send_sumun_the_recovery_mode_email', 10, 2 );
function send_sumun_the_recovery_mode_email( $email, $url ) {
$email['to'] = 'your@email.com';
return $email;
}

Contacto

Info

Av. Cesaraugusto 44, 2º 1ª
50.004 Zaragoza
(Spain)

(+34) 976 49 54 20
(+34) 656 36 65 23

sumun@sumun.net
sumun.net

¿Quieres recibir nuestra newsletter?



 

Visit our blog

 

Office hours

M: 09:00 – 14:00 h & 16:00 – 19:00 h
T: 09:00 – 14:00 h & 16:00 – 19:00 h
W: 09:00 – 14:00 h & 16:00 – 19:00 h
Th: 09:00 – 14:00 h & 16:00 – 19:00 h
F: 09:00 – 14:00 h

During the months of July and August our schedule becomes:

M-F: from 08:00 to 15:00 h.

Basic information about the treatment of your data:

  • Responsible: Sumun Comunicación Global S.L.U. (Sumun)
  • Purpose: queries resolution (contact form) / application management (“work with us” form)
  • Legitimation: privacy policy consent by checking the box to the effect.
  • Recipient: Sumun. The data will not be transferred to third parties.
  • Your rights: access, rectify and delete data, portability of data, limitation or opposition to data treatment, transparency. lopd@sumun.net
  • Expiration: until the user announces that he wants to delete them, or failing that until Sumun considers that they are no longer useful.

What kind of job are you looking for?

Attach your resume in PDF format (maximum 6MB)

Basic information about the treatment of your data:

  • Responsible: Sumun Comunicación Global S.L.U. (Sumun)
  • Purpose: queries resolution (contact form) / application management (“work with us” form)
  • Legitimation: privacy policy consent by checking the box to the effect.
  • Recipient: Sumun. The data will not be transferred to third parties.
  • Your rights: access, rectify and delete data, portability of data, limitation or opposition to data treatment, transparency. lopd@sumun.net
  • Expiration: until the user announces that he wants to delete them, or failing that until Sumun considers that they are no longer useful.

Usamos algunas cookies

Usamos servicios de terceros (Google Analytics y Hotjar) para monitorizar el comportamiento general de los usuarios y así ver qué es lo que más interesa. Si haces clic en aceptar las instalaremos y desaparecerá este mensaje, y confirmarás que aceptas la política de cookies. ACEPTAR

Aviso de cookies