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 not every single one of those versions is kept indefinitely.
We call this cleanup of previous versions “version rollup” and it works logarithmically, meaning that more recent versions are available, but over time they may be consolidated to show less versions in the history. 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.