Skip to content

Post versions: draft a new version while the live one stays up

Describes Publishing 0.19.0.

Every Publishing post has one or more numbered versions: v1, v2, and so on. Readers see one of them, the live version. The others are drafts you work on, or older versions that were live before, so you can rewrite a post without touching what is public until you publish.

Where to find it

Open a post in the editor: in the admin sidebar, open Publishing, then a group such as Blog, and click a post (or go to /admin/publishing/<group>/<post>/edit). You need the Publishing permission. Versions appear once a post has been saved; a new post that was never saved has none yet.

The version controls sit in the row above the editor, next to New Version (and AI Translate, when the AI module is on).

The version switcher

With one version, the row says Version: and the number, for example v1. With more, it lists every version as v1 | v2 | v3. The live one is marked (live), and the one you are editing is highlighted. Hovering a version shows its status (Published (Live), Published, Draft or Archived) and when it was created.

Clicking another version saves your pending edits first, then opens that version. If the save can’t happen (the title is empty, or the slug is taken), you stay where you are and the editor says why.

Every version is editable, including older ones. Editing a version changes only that version.

Creating a new version

New Version opens Create New Version, which asks Choose how to create the new version:

  • Start blank: Create an empty version with no content.
  • Copy from v2 (one entry per version, with its status badge): Duplicate all content and translations from version 2. The copy keeps the version’s settings, such as its featured image and categories, but not its version label.

Create Version makes it and opens it in the editor, in the language you were on. The message says, for example, “Created new version 3 from v2”. A new version always starts as a Draft, so nothing changes for readers.

Publishing a version

The Status menu in the right column (Draft, Published, Archived) belongs to the version: Applies to all languages in this version. To make a draft the live version, set it to Published and save. While another version is live, the editor warns before you save: Saving will publish this version and archive v1, which is live now.

Publishing is one step: the version becomes live, and the version that was live becomes Archived. A version can’t be published while the primary language has no title; the save then keeps it as a draft and says so. Setting the live version itself back to Draft or Archived in the editor doesn’t take the post offline; the publishing-scheduling guide covers that.

Version label

Version label gives a version a name, up to 60 characters, for example e.g. Billing 0.27: Optional. Shown beside the version number in the public version menu, so a reader can find the version for their release. The label belongs to this version only. Leaving it empty removes it.

Letting readers see older versions

By default only the live version is public. Let readers browse older versions (Adds ?v=N access to this post’s published versions. Off by default — only the live version is public.) opens the others: the post page then shows a version menu listing every version that is live now or was live before, newest first, each with its label and the live one marked live. The setting is read from the live version, so turn it on in the version you publish. Drafts that were never published never appear. The publishing-public-pages guide describes the menu on the public side.

The post page in the admin

A post’s own admin page, at /admin/publishing/<group>/<post> (the editor’s address without /edit), has a Versions card listing every version with its status and date. Each one opens that version in the editor.

What it doesn’t do

  • There is no button to delete a version in the admin. A version you no longer want can be set to Archived.
  • Versions can’t be compared side by side.
  • A new version can’t be created before the post’s first save.
  • The label is not copied when you create a version from another one.

For developers

Publishing.import_post/3 and update_post/4 take a version_label; the post map returns it as metadata.version_label, and every version’s label as version_labels.