Skip to content

Early-bird lifetime licence: $199 once, for the first 200 buyers only. See the offer

All docs

History

Every time you save a change to a snippet's code or settings, Snipfire keeps the version you replaced. You can compare any earlier version with what's in the editor and bring it back.

  • Snipfire keeps the last 10 versions of each snippet.
  • Snipfire Pro keeps the last 50.

Switching a snippet on or off, moving it to another folder or changing its tags doesn't create a version: only changes to the code and the settings that affect how it runs (title, type, location, priority, conditions, how it runs, shortcode, and so on).

Compare versions

Open the snippet and click History in the toolbar.

On the left, the list of earlier versions, newest first, with who saved each one and when. Pick one to see:

  • A side-by-side comparison of that version's code with what's in the editor now (including unsaved changes).
  • Settings that differ, for example Where or Conditions, shown as This version: … → now: ….

Bring a version back

Two buttons, for two situations:

  • Load into editor puts that version in the editor. Nothing changes on the site until you save. Use it to look closer, combine it with your current code, or save it after a tweak. Changed your mind? Ctrl+Z (Cmd+Z) undoes it.
  • Restore saves that version straight away. It's checked and test-loaded like any save. If it has problems, it's saved switched off (Restored, but switched off: that version has problems.).

Restoring never loses anything: the version it replaces is added to the history too ("Before restoring the version from …"), so a restore can be undone.

Where versions are kept

Versions are files next to your snippets, in wp-content/snipfire/revisions/. When you delete a snippet, its history is deleted with it.

From the command line

wp snipfire revisions 12        # list the versions of snippet 12
wp snipfire restore 12 <rev>    # restore one (the current version is kept)

Developers can change how many versions are kept with the snipfire_revisions_limit filter. See PHP hooks.

Something unclear or missing? Tell us