Versioning your Blog content

April 18th, 2008 @ 4pm : 17 comments : Socialize This
Filed Under: Tags: , , ,

Have you ever made an edit to some Post, saved the results then sometime later wished you had an undo option? Or worse have you setup a site for a client and they ‘accidentally’ wack one of the Pages? Then they call you to ‘fix it’. Well I have some good news for you…

Introducing a new plugin, Revisions

Design

The Revisions plugin is based on a very old plugin, Bliki (Blog + Wiki), written by the fine folks at Automattic. There are a few other good versioning plugins out there. But in my opinion they all offer too many admin bells and whistles like Version Diff-ing, Funky rollback schemes, Complicated admin interfaces, etc.

Sticking with my ‘Simple’ philosophy, I’ve opted to cut the functionality to the necessities. The Revisions plugin provides the user with three specific types of integrated functionality.

  1. The ability to create a backup of the edited Post/Page. This is built-in once the plugin is activated.
  2. The ability to view a Revision just as you would preview a Post in the Theme.
  3. The ability to reset or rollback a version into the admin editor

Below is a screen capture of the Revision section that is added to the Admin editor screens. This is a screen of 2.5 but looks just the same under pre-2.5 versions of WordPress.

Revisions plugin admin interface

From the screen image you can see there are 3 Revisions to this one Post. Each Revision notes the version number, the time of the Revision and by what author. Below each Revision items is a link ‘View Revision’. This will display a themed version of Revision. There is also a second link that will load the Revision content into the Post/Page editor. Once reloaded the author can Save or make changes to the content. This reload and save will generate a new Revision. In other words the original Revision will remain intact.

Installation

Download the Revisions plugin. Unzip it. Upload the ‘Revisions’ folder to the plugins folder of your WordPress site. Once uploaded go to Manage -> Plugins and activate the plugin. That is it. Now when you make a change to any Post or Page the version is saved. A suggestion is to perform a Save on an existing Post or Page first before starting to make changes. I’ve tested this plugin on WordPress 2.5 down to 2.0.3.

Future Plans

As I mentioned this plugin is basic on purpose. One feature I might be adding in the near future is the ability to delete individual Revisions. Sometime while you are in the Edit & Save cycle you can build up a few unnecessary Revisions. Another possible option will be to define a threshold for comparing the new version to the next previous Revision. If the amount change is below the threshold the Revision is not saved. This would prevent some very minor Revisions.

Enjoy.

Both comments and pings are currently closed.

17 Responses to “Versioning your Blog content”

  1. DenkZEIT » Blog Archive » Wordpress: läuft Says:

    […] Ein neues Plugin habe ich auch gleich installiert: Revisions […]

  2. Denis de Bernardy Says:

    Isn’t this going to be built into WP 2.6?

    http://trac.wordpress.org/ticket/6775

  3. zlpx Says:

    i have store the tags and cats are all in the table postmata for the versions.

  4. Paul Menard Says:

    you are correct. But I started this plugin last fall for some client work not necessarily for broad WordPress users. You might have noticed the released version is 1.2 not the normal 0.9 beta or 1.0 initial release. I hope the version planned for WP core doesn’t get axed and moved to a future version.

  5. Versioning your Blog content | CodeHooligans Says:

    […] Versioning your Blog content | CodeHooligans Uncategorized […]

  6. Revisions WordPress plugin update 1.8 | CodeHooligans Says:

    […] Posts Versioning your Blog contentSimplyExclude Plugin for WordPressCheck WordPress Core Files for HacksWYSIWYG Button Manager for […]

  7. Christopher Says:

    This is something I’ve been trying to convince Urban Giraffe to do for some time: Enable the revision history to be viewed outside of the Admin tool via a function.

    Perhaps this can be included in the next version?

    For now I’m just going to try to hack apart what you’ve done…

  8. Paul Menard Says:

    @Christopher:

    That is something I’ve not thought about accessing the version history via the template. I can work on something but if you’ve got something working please shoot it back to me. Would love to include this in the next version of the plugin. And of course I will give you the proper credit for the addition.

  9. Manne Says:

    Paul, did you get it to work with post metadata?

  10. Mosey Says:

    I can definitely see myself using this for one of my pages! Is it actually possible to restrict the plugin to just e.g. pages or select posts/pages?
    Thanks!

  11. Paul Menard Says:

    @Mosey:

    Thanks for the comment. I’ve not put together a global admin interface to allow turing off revisions for Post or Pages only. But on the Post editor for page you can turn off revisions on a post by post basis. If you check this image Revisions images you can see 2 checkboxes at the top. The second checkbox allow for turning off revisions for this Post/Page item. Problem is if you have 100 posts you would need to edit each one. For now anyway. I might need to add in an admin interface.

  12. Leonaut.com Says:

    Revisions…

    Provide Versioning, Preview and Rollback ability on Pages and Posts….

  13. Luke Gedeon Says:

    Does this plugin do something more than the core functionality in WordPress?

  14. Paul Menard Says:

    @Luke Gedeon: Yeah some small things like being able to mark a n instance of a save action as minor edit like in a Wiki. This will not create a new archive. Other things like controlling the display of and deleting other saved version right on the post/page edit form. Realize I wrote this last year before i was announced that WP would include the versioning functionality.

  15. Tindell Says:

    The black keys for the win. Such an amazing band with amazing album. http://www.theblackkeys.net

  16. DenkZEIT : Neues Tool in meinem Web-Stack: GNU Screen Says:

    […] posts’ in der Denkzeit nicht befriedigend ist (hängt wohl mit dem Einsatz eines Versionierungsplugins für WordPress und der dadurch geänderten Datenbankstruktur zusammen), soll eine Anwendung entstehen, die eine […]

  17. Mund Says:

    Mund…

    […]Revisions plugin for WordPress blogs « CodeHooligans[…]…