Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 

Repository files navigation

πŸ¦… FlyHealthz

PHP Version WordPress Version License

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.


πŸš€ 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-plugins folder upon activation.
  • πŸ”„ Sync-Watcher: Keeps the MU-plugin version in sync with the main plugin file automatically.
  • πŸ•΅οΈ Crawler Protection: Includes X-Robots-Tag: noindex to stay invisible to search engines.
  • πŸ”₯ Modern Tech: Optimized for PHP 8.5+ using str_starts_with, hash_equals, and strict typing.

πŸ› οΈ Installation

  1. Upload the flyhealthz folder to your /wp-content/plugins/ directory.
  2. Activate the plugin via the WordPress 'Plugins' menu.
  3. Done! The plugin will automatically create /wp-content/mu-plugins/flyhealthz.php for 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: GET or HEAD
  • Header (JSON):
    {
      "User-Agent": "FlyHealthz"
    }
  • Keyword Monitoring: Look for OK to ensure the server is responding correctly.

πŸ”¬ How it works

FlyHealthz uses a two-phase engine:

  1. 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 with OK. No database connection is established, and no themes are loaded.
  2. 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


βš–οΈ License

Distributed under the GPL-2.0+ License. See LICENSE for more information.

About

πŸ¦… Ultra-fast Healthcheck for WordPress. Automatically installs and syncs as an MU-plugin for maximum performance. Optimized for PHP 8.5+

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages