Useful Snippets

Welcome!


This blog is used to collect useful snippets related to Linux, PHP, MySQL and more. Feel free to post comments with improvements or questions!

Are your smart devices spying on you? Make better purchasing choices and find products that respect your privacy at Unwanted.cloud

RSS Latest posts from my personal blog


Subscribe to RSS feed


Configure how often WordPress sends recovery mode emails about errors

Stanislav KhromovStanislav Khromov

By default, WordPress sends a maximum of one email per day to the site administrator if a fatal error is discovered. (Since WordPress 5.2)

To configure this, use the following snippet:

add_filter('recovery_mode_email_rate_limit', function($rate) {
  return HOUR_IN_SECONDS;
});

Instead of using one of the predefined constants like HOUR_IN_SECONDS, you can use any integer value, like 600, which would correspond to every 10 minutes.

Full-stack impostor syndrome sufferer & Software Engineer at Schibsted Media Group

Comments 0
There are currently no comments.