FlyHealthz is an ultra-fast, high-performance health check endpoint for WordPress, specifically optimized for PHP 8.5+. It provides a lightweight /healthz route that returns 200 OK while bypassing the heavy WordPress core for maximum speed.
- β‘ Extreme Performance: Executes as a Must-Use (MU) Plugin, intercepting requests before the database or heavy plugins are loaded.
- π‘οΈ Security Gate: Protects your endpoint from bots and flooding by requiring a secret User-Agent (default:
FlyHealthz). - π€ Auto-Installer: Automatically deploys itself to the
mu-pluginsfolder upon activation. - π Sync-Watcher: Keeps the MU-plugin version in sync with the main plugin file automatically.
- π΅οΈ Crawler Protection: Includes
X-Robots-Tag: noindexto stay invisible to search engines. - π₯ Modern Tech: Optimized for PHP 8.5+ using
str_starts_with,hash_equals, and strict typing.
- Upload the
flyhealthzfolder to your/wp-content/plugins/directory. - Activate the plugin via the WordPress 'Plugins' menu.
- Done! The plugin will automatically create
/wp-content/mu-plugins/flyhealthz.phpfor maximum performance.
By default, FlyHealthz only responds if the request's User-Agent matches FlyHealthz. Any other request will receive a 403 Forbidden response instantly, saving your server resources from bots.
You can customize the secret agent string in your wp-config.php:
define( 'FLYHEALTHZ_SECRET', 'Your-Super-Secret-String' );To use FlyHealthz with monitoring tools like Uptime Kuma, configure your monitor as follows:
- URL:
https://yourdomain.com/healthz - Method:
GETorHEAD - Header (JSON):
{ "User-Agent": "FlyHealthz" } - Keyword Monitoring: Look for
OKto ensure the server is responding correctly.
FlyHealthz uses a two-phase engine:
- Phase 1 (The Engine): Intercepts the request at the very beginning of the PHP lifecycle. If the path is
/healthz, it checks the headers and exits immediately withOK. No database connection is established, and no themes are loaded. - Phase 2 (The Control Layer): Runs only in the WordPress Admin area to manage the auto-installation, synchronization, and cleanup of the MU-plugin file.
Kevin Heinrichs
- Website: https://www.kevinheinrichs.com/
Distributed under the GPL-2.0+ License. See LICENSE for more information.