Node revisions

Last updated on
19 March 2025

This documentation needs work. See "Help improve this page" in the sidebar.

Specific version(s)

Available in version: Drupal 8, 9, 10, 11.
Screenshots: Drupal 10.3.
For Drupal 7 documentation see Drupal 7 guide.

Tracking Changes with Node Revisions

Drupal automatically creates a new revision whenever you edit a node. This allows you to see how the content has evolved over time and revert to previous versions if necessary.

Enabling and Managing Revisions

  • By default, revisions are enabled for all content types.
  • To confirm or disable revisions for a specific content type, navigate to Administration > Structure > Content types.
  • Edit your desired content type and look for the Publishing options section.
  • Check or uncheck the Create new revision box as needed. (Editors can still override this setting for individual nodes.)
    Editing content type publishing

Viewing and Restoring Revisions

  • Open a node and locate the Revisions tab. You'll need either "View revisions" or "Administer content" permission to access this tab.
  • The Revisions tab displays a table listing all revisions for the node, including:
    • Timestamp
    • Author
    • Revision log message (if provided)
  • Click on a specific revision to view its full content.
  • To revert to an earlier revision, select the desired revision and click Revert. This creates a copy of the chosen revision and sets it as the new published version.

Understanding Revision Behavior

  • Reverting to a previous revision (e.g., revision #2) creates a copy (#2 copy) and sets it as the current revision. This leaves the original revisions intact (revisions #1, #2, #3, and the previous current revision).

Adding Meaningful Revision Messages

  • When saving a revision, consider adding a message in the Revision log message field. This helps others (or your future self) understand the reasoning behind the changes. While filling the field is optional at the time of this writing, there is a feature request to allow the field to be configured as mandatory.
    Configuring content type publishing

Detailed Revision Comparison

  • While the Revisions tab shows individual revisions, it lacks built-in functionality for side-by-side comparison.
  • To see the exact differences between revisions, install the contributed Diff module.

Database and Revisions

  • The node_revision table always contains a record for the current revision of each node, even if revisions are disabled.
  • Enabling revisions creates additional entries in the node_revision table for all past revisions of a node.

Advanced Functionality

Additional Notes

  • Filling in the Revision log message field is currently optional but might become mandatory in the future.

Help improve this page

Page status: Needs work

You can: