Versioning content
#Overview
Content Versioning allows you to view the evolution of the project's published content. When versioning is enabled, every published change will result in a new version being created.
The number of versions that are saved and available to you depends on your plan with Hygraph.
-
Versioning is available on paid plans only.
-
Versions don't keep assets or referenced entries. In those cases we only preserve the link between the version of a content entry and an asset or a related entry. This means that if you delete them, you won't be able to restore them using version comparison.
#Create a new version
Create a new version
- Open a content entry.
- Edit the content then click
Save and Publish
- versions are created on everyPublish
.
Learn more about Publishing content.
#Comparing versions
At the moment, Hygraph Studio does not support this feature. Switch to Hygraph Classic to use it.
Having different content stages allows users to compare versions of content in different stages. When editors want to quickly revert changes to the DRAFT
stage from the PUBLISHED
stage, they can compare the two content stages and choose which fields to revert to the PUBLISHED
stage.
It saves content teams time and energy by ensuring they won't need to do double the work when trying to roll back changes.
- Open a content entry you'd like to compare versions on.
- Find the box labeled
Versions
section on the right contextual sidebar. - Click on the alternating arrow icon next to the content entry.
- A split pane window will display comparing the content from the current draft version to the chosen published version. An arrow will appear next to the right-hand comparison, the
PUBLISHED
content stage. You can revert to this content by clicking the arrow next to the field you want to revert to.
List of content versions
Clicking on one of the content versions on the table takes you to the versions side-by-side comparison view:
Versions side-by-side comparison view
You will see your current version on the left, and the version you selected on the right. The content is separated into the individual fields configured for the model in your schema.
In the middle of both versions, you will find the arrows to replace the content - we show this in the next section of this document.
#Restoring versions
- Open a content entry version from the contextual sidebar.
- Click the arrow moving from right to left. The current entry state content is always the content on the left. Clicking on the arrow replaces this content with the selected version.
Restore a content field
If your draft stage content is different than the published content, it is not possible to compare a previous version with the current published state. First revert your drafted state with the existing published state then compare the versions.
If you delete an entry, or downgrade a project and continue editing content, versions will also be deleted.