brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: RECOVERY_MODE_EMAIL sends WordPress crash mails to the person who fixes them

WordPress
~/tips/tip-wordpress-recovery-mode-email

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

Sends the recovery mode link to a developer address instead of the site admin email.

When a plugin crashes a site, WordPress mails a recovery mode link. By default that goes to the admin email from Settings > General, which is often the client or a shared inbox nobody reads.

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

With this in wp-config.php, the “Your site is experiencing a technical issue” mail goes to that address instead. It contains the error, the plugin or theme that caused it, and a special login link. That link starts recovery mode: you log in, the broken extension is paused for you only, and you can deactivate or fix it while visitors still get the error page.

I like this setup for sites you maintain for someone else. The owner keeps their admin email for normal notices, and the technical mail lands with the person who can act on it.

WordPress checks the value with is_email(). If the address is not valid, it quietly falls back to the admin email, so a typo means the mail goes back to the old inbox and you don’t notice. Send yourself a test before you rely on it: a plugin with a deliberate syntax error on a staging copy does the job.

The mail still needs working outgoing email on the server. A site that can’t send mail can’t send this one either.

Further reading: get_recovery_mode_email_address(), Fatal error recovery mode in 5.2

More WordPress tips wp user application-password create anna backup-script --porcelain define( 'MEDIA_TRASH', true ); wp cli check-update wp theme delete --all wp media image-size All WordPress tips (85) All topics

Link