Wonderful Fatal Circuit Breaker

Description

A broken plugin update can take a whole site down — and WordPress’ built-in recovery mode only pauses the plugin for the administrator who clicks the recovery link, while every visitor keeps seeing the error.

This plugin works like an electrical circuit breaker: it counts PHP fatal errors per plugin within a configurable time window. When the same plugin keeps crashing (default: 5 fatals within 10 minutes), the breaker trips and the plugin is deactivated automatically. Your site keeps running without the broken plugin instead of staying down.

Plugins your site must not run without (shop, membership, security) can be ticked off as protected — they are never deactivated automatically. For protected plugins you only get a notification, so a human can decide.

Optionally, a webhook URL (Slack, Discord, n8n, …) can be configured. Whenever the breaker trips — or a protected plugin keeps crashing — a notification is sent there.

What the breaker does when it trips:

  • Removes the broken plugin from the active plugins — without running any of its deactivation hooks (the plugin is broken; running its code would be exactly the wrong move).
  • Shows a persistent admin notice with the error details until you reactivate the plugin.
  • Sends a webhook notification if a webhook URL is configured.

Screenshots

Installation

  1. Upload the wonderful-fatal-circuit-breaker folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Go to Settings > Fatal Circuit Breaker in your admin dashboard.
  4. Tick off the plugins that must never be deactivated automatically.
  5. Optionally enter a webhook URL and verify it with the Send test message button. That’s it!

FAQ

Which error types are counted?

E_ERROR, E_PARSE, E_CORE_ERROR, and E_COMPILE_ERROR — the errors that actually take a site down. Warnings, notices, and deprecations are ignored.

Can a single fatal error deactivate one of my plugins?

No. The threshold has a hard minimum of 2, and the default is 5 fatals within 10 minutes. A one-off hiccup never trips the breaker.

What happens to plugins I marked as protected?

Nothing — they are never deactivated automatically. If a protected plugin keeps crashing, you receive a webhook notification (if configured) so you can act manually. This plugin itself is always protected.

Are all fatal errors caught?

Runtime fatals — the vast majority, e.g. a plugin crashing while rendering a page — are caught. Fatals that happen while WordPress is still loading the plugin files themselves (e.g. a syntax error in a plugin’s main file) occur before this plugin can register its handler and cannot be counted.

Does this work on multisite?

The breaker only manages the per-site active plugins. Network-activated plugins are never touched.

Does this plugin affect my site’s performance?

No. The plugin only runs a very lightweight check at the very end of a PHP process, and only if a fatal error has occurred. It has no impact on the performance during normal site operation.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Wonderful Fatal Circuit Breaker” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.2

  • Removed load_plugin_textdomain() call (translations are loaded automatically by WordPress.org since WP 4.6).
  • Prefixed the test-notice transient and WP_Error codes with the full plugin prefix.

1.0.1

  • Coding standards: prefixed global variables in uninstall.php.

1.0.0

  • Initial release.