publish_guard
Security covered
Publish Guard restricts content publishing to specific days and times, helping editorial teams prevent accidental publishing during off-hours, weekends, or holidays when no one is available to monitor the site.
Features
- Flexible scheduling — Select which days of the week publishing is allowed and define daily start/end times
- Two enforcement modes — Choose between "Warn" (displays a message but allows publishing) or "Block" (prevents publishing entirely)
- Custom messages — Configure the restriction message shown to editors
- Permission-based bypass — Grant trusted roles the ability to publish anytime using the "Bypass Publish Guard" permission
- Timezone-aware — Uses your site's configured timezone for accurate time checks
When to use this module:
- Prevent accidental publishing during nights or weekends
- Enforce publishing blackouts during holidays or maintenance windows
- Add a confirmation step during low-staffing periods
- Meet compliance requirements that restrict when content can go live
Post-Installation
- Navigate to Configuration → Content authoring → Publish Guard (
/admin/config/content/publish-guard) - Check Enable publishing restrictions
- Select which days publishing should be allowed
- Set start and end times for the daily publishing window
- Choose strictness level (Warn or Block)
- Optionally enter a custom message
- Save configuration
The module is disabled by default — no restrictions apply until you enable it.
To allow specific users to bypass restrictions, grant them the Bypass Publish Guard permission at /admin/people/permissions.
Additional Requirements
None. Publish Guard works with Drupal core only and has no external dependencies.
- Drupal 10.3+ or Drupal 11
- PHP 8.1+
Recommended modules/libraries
None required, but consider:
- Scheduler — For scheduled publishing (note: Publish Guard does not restrict scheduled publishes, as these occur via cron)
- Content Moderation — For editorial workflows (note: Publish Guard does not currently integrate with moderation state transitions)
Similar projects
- Scheduler — Schedules content to publish/unpublish at specific times, but doesn't restrict when users can publish
- Workflow — Provides editorial workflows but doesn't enforce time-based restrictions
- Moderation Sidebar — Improves the moderation UI but doesn't add time restrictions
Publish Guard is unique in providing simple, time-window-based restrictions on the publishing action itself.