Unpublished

Unpublished content is a Drupal item whose Published status is off. It stays in the database and editable, but only users with special access can view it.

Learn DrupalDrupal glossary

In Drupal, unpublished content is hidden from the public but not gone. The item keeps all its fields and revisions, and users with the right permissions can still open it, edit it and publish it again. A new item can start unpublished, and a published item can be unpublished later.

How unpublished content works in Drupal 11

The status is a boolean on the entity. In code you set it with setUnpublished() from EntityPublishedInterface, and you read it with isPublished(). The Drupal user guide gives an example setup: all site visitors might be able to see published items, while only content creators and editors can see unpublished ones.

Who can view an unpublished node is decided by permissions. The owner can see it with View own unpublished content, but only when logged in; the node access handler never grants this to anonymous visitors. Bypass content access control shows everything. With the Content Moderation module enabled, View any unpublished content lets a role see unpublished items it does not own.

With Content Moderation, unpublished is no longer a checkbox you flip. A workflow state carries a Published flag, and saving content into the state sets the status. In the Editorial workflow from the Standard profile, two states are unpublished: Draft and Archived. Draft is not the default revision, so it can sit on top of a live page. Archived is the default revision, so it replaces the live page and takes it offline.

Example

A site has a published case study that is out of date. Without Content Moderation, an editor opens it, unchecks Published and saves. With the Editorial workflow, the editor uses the state selector on the edit form (Change to) and picks Archived, which the Archive transition allows from Published. Either way, the case study vanishes for visitors but stays in the Content overview, where the Published status filter can list it.

Common mistakes

  • Using Draft to take a page offline. A new draft does not unpublish the live version. Archive it instead.
  • Forgetting the view permissions for authors. The Content Moderation documentation lists View own unpublished content, with View the latest version, as what authors need to see their latest changes.
  • Granting View own unpublished content to anonymous visitors, hoping to preview. The access handler ignores it for anonymous users. Use a logged-in role.
  • Looking for the Published checkbox on a moderated type. Drupal blocks edits to the Published field on moderated items, so the status follows the state.

For marketing and content teams

Unpublished content is where unfinished work waits. Ask which of your roles can view it, so reviewers can open the page before launch. Before a campaign goes live, filter the Content overview by Published status and look for pages that were left unpublished by mistake.

Sources

Questions about unpublished content

Unpublished means the Published status of the current revision is off. A draft is a Content Moderation state: in the Editorial workflow it is not published and is not the default revision, so a new draft on a live page leaves the live version visible. A page that was never published is simply unpublished.

Use a transition, not the checkbox. In the Editorial workflow that Drupal core ships, the Archive transition moves a published item to Archived, which is unpublished. The Drupal.org documentation says this is how you unpublish when the default workflow is in use.

No. An unpublished item stays in the database with all its fields and revisions, and a user with the right access can edit it and publish it again. Deleting is a separate action that removes the item.

Related terms

All Drupal terms from A to Z