Popis
This plugin provides a simple but powerful function for developers and site administrators. It automatically captures critical PHP errors (fatal errors, parse errors, etc.) that would otherwise take your site down silently.
Instead of having to check server logs, you receive an instant notification via a webhook to a service of your choice, like Slack or Discord. This allows for immediate action and faster debugging.
The setup is minimal: just add your webhook URL on the settings page, and the plugin takes care of the rest.
External services
The plugin has no service of its own. It sends data only to the webhook URL you enter on its settings page — Slack, Discord, n8n or whatever you choose — and contacts nothing else. The terms and privacy policy of the service you point it at apply.
Nothing is sent until you save a URL. After that:
- The „Send test message“ button sends a fixed message plus your site address.
- A PHP fatal error sends: site address, error type, file, line, message, the method and path of the crashed request, and peak memory against the configured limit.
No visitor data is included — no IP addresses, cookies, form contents or accounts. The crashed request’s path does travel along, so a query string holding personal data would be included.
Inštalácia
- Upload the
wonderful-webhook-alertsfolder to the/wp-content/plugins/directory. - Activate the plugin through the ‚Plugins‘ menu in WordPress.
- Go to Settings > Webhook Alerts in your admin dashboard.
- Enter your webhook URL and save the settings.
- Use the Send test message button to verify the connection. That’s it!
Časté otázky
-
What is a webhook URL?
-
A webhook URL is a special web address provided by services like Slack, Discord, or Zapier. When your WordPress site sends a message to this URL, the service receives it and can post it, for example, in a specific chat channel. You can get this URL from the settings of your chosen service.
-
Does this plugin affect my site’s performance?
-
It reads its settings once per request and holds back half a megabyte of memory, so it can still report if the request runs out. Beyond that it does nothing until a fatal error happens.
-
Which error types are reported?
-
The plugin reports
E_ERROR,E_PARSE,E_CORE_ERROR,E_COMPILE_ERROR,E_USER_ERROR, andE_RECOVERABLE_ERROR— the same set WordPress itself treats as fatal. -
Does it also report „Allowed memory size exhausted“?
-
Yes, labelled separately. On an out-of-memory crash the file and line PHP reports are wherever the last allocation landed, not the cause — so the notification also carries peak memory, the configured limit and the crashed request.
-
The same error keeps happening. Will I get flooded?
-
No. An identical error — same message, file and line — is reported at most once every five minutes, so a fault that hits many requests at once still produces one notification.
-
Does the plugin add a file to wp-content?
-
Yes:
wp-content/fatal-error-handler.php, WordPress‘ official drop-in. It has to run first — WordPress registers its own shutdown handler before plugins load, and by then the error can already have been replaced by a later one.If another plugin already owns that file, it stays untouched and the settings page says so. Alerts keep working either way. The file is removed when you deactivate or delete the plugin.
-
Can I intercept the notification?
-
Yes. The filter
wonderful_webhook_alerts_pre_crash_dispatchreceives( null, $url, $body )and replaces the built-in transport when it returns anything but null.
Recenzie
Pre tento plugin nie sú žiadne recenzie.
Prispievatelia a vývojári
“Wonderful Webhook Alerts” je softvér s otvoreným zdrojovým kódom. Do tohto pluginu prispeli nasledujúci ľudia.
PrispievateliaPreložiť „Wonderful Webhook Alerts“ do vašho jazyka.
Máte záujem o vývoj?
Prehľadávajte zdrojový kód, preskúmajte SVN repozitár, alebo sa prihláste na odber vývojárskeho logu cez RSS.
Zoznam zmien
1.2.0
- Memory exhaustion is now reported: a small reserve is held back and the limit raised before sending, so a request with nothing left still gets a notification out.
- Notifications carry the crashed request and peak memory against the limit, and label memory exhaustion separately from a code defect.
E_USER_ERRORandE_RECOVERABLE_ERRORare reported too — the set WordPress itself treats as fatal.- Identical errors are throttled to one notification per five minutes.
- Installs WordPress‘ fatal error handler drop-in, so the error is read before anything can overwrite it. An existing drop-in is never overwritten.
- New filter
wonderful_webhook_alerts_pre_crash_dispatch. - Full plugin prefix on the transient and error codes, per the WordPress.org review guidelines.
- Uninstall removes the drop-in and the throttling markers.
1.1.1
- Tested up to WordPress 7.0.
1.1.0
- Enable/disable switch to turn fatal error alerts on or off without deactivating the plugin.
- „Send test message“ button to verify the webhook connection from the settings page.
1.0.0
- Initial release.
