dotCMS logodotCMS logo
OverviewAuthorBuildManageReference
dotCMS Github RepodotCMS Github RepodotCMS Discourse CommunityChat With Us
Overview
ReleasesIntroductionGuides and Tutorials
No Overview side nav found for /docs/setting-publish-and-expire-dates-for-content.

dotCMS

Universal content management, made simple.

GitHubTwitterLinkedIndotCMS Discourse Community
dotDev HomeBlogChangelogsCurrent releasesAboutContactPrivacy PolicyTrust Center

© 2026 dotCMS. All rights reserved.

    Assistant

    Responses are generated using AI and may contain mistakes.

    Hi, I'm an AI assistant with access to documentation and other content.

    Tip: You can toggle this pane with ⌘/ or ⌘K.

    Try asking

    Enter to send · Shift+Enter for newline

    Setting Publish and Expire Dates for Content

    dotCMS allows the user to define Publish and Expire dates for content in order to automatically Publish and/or Unpublish a piece of content on given dates instead of do it manually.

    In order to enable this feature a Content Typemust have at least one Date and Time field. If you wish to use both the Publish and Unpublish features, the Content Type must have at least two Date and Time fields (one each for Publish and Unpublish).

    Date and Time fields

    After the definition of the Publish and/or Unpublish fields on the Content Type we associate those fields on the Content TypeProperties selecting them on the Publish and Unpublish Date Field properties.

    Publish and Unpublish Date Field properties

    Now that we associated our Publish and Expire fields properly in the Content Typewe are ready to use them, selecting a Publish date will Publish automatically the current piece of content on that given date and selecting an Expire date will Unpublish the current piece of content on that selected date.

    Publish date will Publish automatically the current piece of content on that given date and Expire date will Unpublish the current piece of content on that selected date.

    **Note:**It is not necessary to define an Expire date as you can mark the piece of content to never expire, also it is very important to remember that as we are leaving the responsibility to Publish and Unpublish the piece of content to dotCMS you can't do it manually, for example, trying to Publish a piece of content that is scheduled on a future date will throw an error message as it is responsibility of the system to do it.

    For more information, see the Add New Content to an HTML Page documentation.