FlyHealthz
π¦ Ultra-fast Healthcheck for WordPress. Automatically installs and syncs as an MU-plugin for maximum performance. Optimized for PHP 8.5+
by Kevin Heinrichs Β· github.com/kevinheinrichs/flyhealthz Β· website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/kevinheinrichs/flyhealthz/archive/refs/heads/main.zipFlyHealthz 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.
π Key Features
- β‘ 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.
π οΈ Installation
- 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.
π‘οΈ Security Configuration
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.
Custom Secret Agent
You can customize the secret agent string in your wp-config.php:
define( 'FLYHEALTHZ_SECRET', 'Your-Super-Secret-String' );
π Monitoring with Uptime Kuma
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.
π¬ How it works
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.
π¨βπ» Author
Kevin Heinrichs
- Website: https://www.kevinheinrichs.com/
βοΈ License
Distributed under the GPL-2.0+ License. See LICENSE for more information.