Publish Rules in Contentstack help manage the publishing and unpublishing of content based on defined parameters and conditions. They ensure compliance, maintain content accuracy, and uphold workflow integrity. This feature is especially useful for content managers, marketers, and enterprise teams working with multi-stage review or approval processes.
Note: Only the stack owner, admin, or developer can define Publish Rules. Setting up publish rules is optional.
Publish Rules consist of two components: Parameters and Conditions.
Each publish rule must include the following parameters:
Language: The language(s) to which the rule applies.
Each publish rule must include at least one of the following conditions. You can use one or both depending on your requirements.
Use this condition to require approval before publishing or unpublishing entries. Specify one or more users or roles authorized to approve these actions.
For example, if a role such as Content Manager is set as the approver, any entry that matches the defined parameters (such as content type, environment, or action) must be approved by at least one member of that role before publishing or unpublishing.
Note: A publish rule with approvers can function independently of workflows. You can configure approval rules even if no workflows exist in the stack.
Enable this setting to prevent the same user who last edited an entry from approving or publishing it.
When enabled:
This control enforces a dual-approval process, also known as the Four-Eyes Principle, ensuring that no individual can self-approve or self-publish their own changes.
Tip: Enable this option to enhance compliance and editorial governance by maintaining a clear separation between content creation and approval.
Note: To use the Stage condition, at least one workflow must be set up in the stack.
Use this condition to restrict publishing or unpublishing until an entry reaches a specific workflow stage. Once applied, an entry cannot be published or unpublished unless it meets the defined stage criteria.
For example, if the condition is set to the Complete stage, only entries that reach this stage and match the defined parameters become eligible for publishing or unpublishing.
Once a publish rule is active, any attempt to publish or unpublish an entry in the specified environment triggers rule validation:
This ensures that every publishing action adheres to the configured compliance, workflow, and approval conditions.