-
Notifications
You must be signed in to change notification settings - Fork 83
Add site health check for DISABLE_WP_CRON configuration #2583
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add a new health check to warn site administrators when the DISABLE_WP_CRON constant is enabled. While it's acceptable to use a system cron to call wp-cron.php, having WP-Cron completely disabled can cause delays in: - Publishing posts to the fediverse - Processing reactions (likes, boosts, replies) - Other scheduled ActivityPub tasks The health check: - Shows as "good" when WP-Cron is enabled (default) - Shows as "recommended" warning when DISABLE_WP_CRON is true - Provides clear explanation of potential impacts - Includes link to WordPress documentation on setting up system cron - Suggests running system cron every 1-5 minutes for optimal performance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new site health check to detect when WordPress's built-in cron system is disabled via the DISABLE_WP_CRON constant, which can impact ActivityPub's ability to publish posts and process reactions in a timely manner.
Key changes:
- New site health test that warns administrators when
DISABLE_WP_CRONis enabled - Provides guidance on proper system cron configuration as an alternative
- Includes documentation link for setting up system cron
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| includes/wp-admin/class-health-check.php | Adds test_wp_cron() method and registers it as a site health check to detect and warn about disabled WP-Cron |
| .github/changelog/2583-from-description | Changelog entry documenting the new feature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Proposed changes:
DISABLE_WP_CRONconstant is enabledThis PR is the result of a support case on Mastodon.
Other information:
N/A - Site health check addition, would require testing environment with
DISABLE_WP_CRONenabledTesting instructions:
To test the warning state:
define( 'DISABLE_WP_CRON', true );to yourwp-config.phpTo test the good state:
DISABLE_WP_CRONfromwp-config.php(or set tofalse)Changelog entry
Changelog Entry Details
Significance
Type
Message
Add site health check to warn when DISABLE_WP_CRON may impact ActivityPub functionality