| 开发者 | kapoordev |
|---|---|
| 更新时间 | 2026年12月2日 12:37 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
/wp-admin/ and /wp-login.php all return 500.loading_plugin, plugins_loaded, template_render, setup_theme…), the error type and the message. The recovery link reaches the site admin address by email, so you do not have to reach wp-admin to find out where to go.wp-settings.php line 69, before plugins and themes load, and only a wp-content/fatal-error-handler.php drop-in can replace it. A normal plugin registering shutdown runs too late: core's handler has already rendered the error page and exited. On activation, Fatal Rescue installs two small files to get in front of that:
wp-content/fatal-error-handler.php — captures the fatal and names the extension responsible.wp-content/mu-plugins/fatal-rescue-loader.php — filters option_active_plugins, option_template and option_stylesheet so the quarantine applies to every visitor.wp-content/uploads/fatal-rescue/, outside the plugin directory, so a plugin update or a failed upload mid-update cannot delete the record of what is paused. That folder carries its own deny rules, the file is written 0600, and its name is a random per-install token rather than state.json, so a request that guesses the URL finds nothing even on nginx or IIS, where .htaccess is never read. If you would rather block the folder outright at the server level, deny wp-content/uploads/fatal-rescue as you would any other protected upload folder.
fatal-rescue.zip → Install Now → Activate.wp-content/ is not writable by PHP, the plugin tells you exactly which two files to upload and shows their contents. Both are removed on deactivation, and never overwritten if another tool owns them.No. The active_plugins option is never modified. The extension is filtered out at load time, which is why Restore is instant and safe.
Yes. A fatal in a theme's functions.php is attributed to the theme, and pausing it switches to a bundled default theme such as Twenty Twenty-Five until you restore yours.
Not on activation. Installing the plugin sends no mail of any kind, because the link is a credential and an inbox is not a place to put one unasked.
What does get emailed is an outage: when Fatal Rescue catches a fatal, the next page view mails the site admin address a notice naming the extension, the stage it died at, and the panel link. The send happens on the next page view rather than inside the crash - the fatal handler runs at shutdown with whatever is left of a working WordPress, and a fatal caused by the database cannot also be delivered by a database query. There is no cron and no third-party service, so a site nobody visits holds the notice until someone loads a page, and the Fatal Rescue screen always shows what is waiting and why.
You can ask for the link itself at any time with the "Email me the panel link now" button, which is also how you prove the site can deliver mail before an outage has to depend on it. Nothing sends that one unasked.
Delivery goes through wp_mail(), so it follows whatever mail setup the site already has. Define FATAL_RESCUE_NO_MAIL in wp-config.php to stop it, or point the fatal_rescue_notify_email filter at an agency address. A site that cannot send mail says so on that screen instead of failing quietly.
It reports one honestly and tells you to rename it over FTP. WordPress loads mu-plugins/ before any filter runs, so no plugin — including this one — can skip an mu-plugin. That is a WordPress limitation, not a Fatal Rescue shortcut.
Yes, with one consequence worth knowing. Both guard files and the recovery state live once per installation — in wp-content/, not per site — because they are read before WordPress resolves which site a request is for. So pausing an extension from any site's panel pauses it for the whole network, and Restore returns it network-wide. You do not need to network-activate it: activating on one site installs the shared guards that cover every site. The Fatal Rescue screen is registered under each site's admin rather than Network Admin, so run the rehearsal and the mail test from the site you activated on.
Run a rehearsal from the Fatal Rescue screen. The failure comes from src/rehearsal-fixture.php, a file this plugin ships and loads only while a rehearsal is armed, so nothing executable is ever written to your site. Arming writes one file: an expiry marker holding one integer, in wp-content/uploads/fatal-rescue, the folder Fatal Rescue already keeps its recovery state in. The next front-end page view fatals for real; Fatal Rescue catches it, names Fatal Rescue Rehearsal as the culprit and hands you the panel. Pause it and the site renders again; stop the rehearsal and the marker is deleted. If you walk away, the marker expires in five minutes and the rehearsal ends on its own. Your own plugins, themes and options are never involved.
On a healthy site it registers four option filters, records which bootstrap stage WordPress is in, and touches no database and no file on the request that renders a page: the one write it makes is a refresh of the plain-file snapshot of what is active, and that happens only when the list actually changes or once an hour. No cron job, no outbound request, no query. Mail leaves only when there is something to report, and it reads the state file the guard had already loaded. The settings screen and the installer are only loaded on admin requests, and fatal-error-handler.php is read by WordPress only when a fatal is already happening. Nine interleaved pairs of the same page on a local test bed (guard files present, guard files renamed away) came out within noise of each other; absolute timings on one laptop track swap, not code, so the paired comparison is the one worth quoting.
Fatal Rescue leaves that file alone and says so on its settings screen. Quarantine still works, so a broken extension is still skipped for every visitor; only the custom error page belongs to the other tool. The recovery panel moves to its other guard file, wp-content/mu-plugins/fatal-rescue-loader.php, and the link on the settings screen, in the dashboard notice and in the outage email points there instead — so the page you open from your phone on the day the site is broken is still there.
/wp-admin/ and /wp-login.php all return 500.wp_loaded, inside a template or on the wp hook. That watch ends as soon as a request finishes cleanly and expires on its own after five minutes, so it cannot outlive the restore it belongs to.