Every time a Pen is saved, either automatically or manually, a version is created. The preview you see of a Pen, after a build, is a view of that version specifically. This is important because it means there is a history to your Pen that you can have access to in case, for example, you make a mistake or need to revert to an older version.

⚠️ Versions are not launched yet! This feature is coming soon. The information on this page may change.

Revert to a Previous Version

Accessing a Pen’s Version History is a PRO feature. If you’re on a PRO plan, you can view and revert to older versions. Versions have their own panel. Open it from the sidebar (or a command) and you’ll be able to see all past versions which include a Revert button which will update the Pen (the entire file system) to that previous version.

Version Rollups

CodePen saves a version with every save of the Pen, but every single one of those versions isn’t kept indefinitely.

We call this cleanup of previous versions “version rollup” and here is how it works:

First 24 hoursAll versions kept
1 – 7 DaysKeep 1 successful version per hour
7+ DaysKeep 1 successful version per 12 hours

The more recently you’re looking to roll back, the more specific you can be about exactly when.

Versions that you have deployed are not subject to rollup.

Version Limitations

  • Only the code is versioned, not things like comments and hearts.
  • Versions are only available on PRO plans.