Health Checks
LicenceForge includes a built-in health monitoring system that checks critical components of your installation. Health checks run automatically during daily maintenance and can also be triggered manually. Results are displayed on the WordPress admin dashboard and can optionally trigger email alerts.
How Health Checks Work
The WPLF_Health_Check::run_all() method executes every registered check and returns a result object containing:
- Overall status -- the worst status across all individual checks
- Individual check results -- each check reports its own status and a human-readable message
Status Levels
Each check returns one of three status levels. The overall system status is determined by the worst individual result.
| Status | Meaning | Dashboard Indicator |
|---|---|---|
ok |
The check passed with no issues | Green |
warning |
A potential problem was detected but the system is still functional | Yellow |
error |
A critical problem was detected that may affect functionality | Red |
For example, if six checks return ok and one returns warning, the overall status is warning. If any single check returns error, the overall status is error.
Individual Checks
LicenceForge performs seven health checks. Each is described below with its trigger conditions.
Cron Check
Verifies that the daily maintenance cron job has run recently by inspecting the wplf_last_maintenance_run timestamp.
| Condition | Status |
|---|---|
| Last run was more than 48 hours ago, or no run recorded | error |
| Last run was more than 26 hours ago | warning |
| Last run was within 26 hours | ok |
Tip
If the cron check consistently reports warnings, your WP-Cron may not be firing reliably. Consider setting up a server-side cron job.
Database Check
Confirms that all seven core database tables exist. The check queries the WordPress database for each expected table.
| Required Tables |
|---|
wplf_products |
wplf_product_prices |
wplf_licenses |
wplf_activations |
wplf_webhook_events |
wplf_audit_log |
wplf_analytics |
| Condition | Status |
|---|---|
| One or more core tables are missing | error |
| All tables present | ok |
If tables are missing, deactivate and reactivate the plugin. This triggers the dbDelta() routine which recreates missing tables without affecting existing data.
Webhooks Check
Monitors the wplf_webhook_events table for delivery failures.
| Condition | Status |
|---|---|
Any permanently failed events (exceeded MAX_RETRIES) in the last 7 days |
error |
| More than 5 webhook errors in the last 24 hours | warning |
| No significant failures | ok |
Storage Check
Validates that the configured storage backend is accessible and writable. The specific check depends on which storage method is in use.
Local Storage
| Condition | Status |
|---|---|
| Assets directory is missing or not writable | error |
| Assets directory exists and is writable | ok |
S3 Storage
| Condition | Status |
|---|---|
| Connection to S3 bucket fails | error |
| Connection successful | ok |
REST API Check
Sends a request to the /wplf/v1/health endpoint to verify the REST API is reachable.
| Condition | Status |
|---|---|
| Endpoint is unreachable (connection error or timeout) | error |
| Endpoint responds but with a non-200 HTTP status | warning |
| Endpoint responds with HTTP 200 | ok |
Note
If your site is behind a firewall or reverse proxy, the loopback request to the REST API may be blocked. Ensure that requests from the server to itself are permitted.
Disk Space Check
Checks the available disk space on the partition where the WordPress installation resides.
| Condition | Status |
|---|---|
| Less than 100 MB available | error |
| Less than 500 MB available | warning |
| 500 MB or more available | ok |
PHP Version Check
Checks the running PHP version against recommended minimums.
| Condition | Status |
|---|---|
| PHP version is below 8.0 | warning |
| PHP 8.0 or higher | ok |
LicenceForge requires PHP 7.4 at minimum (enforced at activation), but PHP 8.0+ is recommended for performance and long-term support.
Dashboard Health Indicator
The WordPress admin dashboard displays a LicenceForge Health widget that shows the overall system status and a summary of each individual check. The widget updates every time you load the dashboard page.
The status indicator uses the following colours:
- Green -- all checks passed (
ok) - Yellow -- one or more warnings but no errors
- Red -- one or more errors detected
Click any individual check result in the widget to see its detailed message.
Health Alerts
LicenceForge can send an email notification when health checks detect a warning or error status during the daily maintenance cron run.
Configuration
Health alerts are controlled by two options in Licences > Settings:
| Option | Default | Description |
|---|---|---|
wplf_health_alerts_enabled |
false |
Set to true to enable health alert emails |
wplf_health_alert_email |
WordPress admin email | The email address that receives health alert notifications |
You can also set these via WP-CLI:
wp option update wplf_health_alerts_enabled true
wp option update wplf_health_alert_email [email protected]
Alert Behaviour
Alerts are sent at most once per day during the wplf_daily_maintenance cron execution. If health checks return ok, no email is sent. The alert email includes the overall status, a list of all checks with their individual statuses, and any error or warning messages.
Running Health Checks Manually
Via the Admin Panel
Navigate to the WordPress admin dashboard and review the LicenceForge Health widget. The dashboard always runs checks fresh on page load.
Via WP-CLI
Trigger the daily maintenance cron (which includes health checks) from the command line:
wp cron event run wplf_daily_maintenance
Related Pages
- Cron Jobs & Scheduled Tasks -- Scheduled event configuration and troubleshooting
- Data Retention -- Retention periods for logs, webhooks, and analytics
- System Requirements -- Minimum and recommended server specifications
- Admin Dashboard -- Dashboard widgets and status indicators