Version control in WordPress

One of WordPress feature which is not highlighted is version control management of a post. This feature is available by default, nothing to install. With this one, you can check modifications done from one version to the other, but also restore an old version of a post.

To use it, edit a post, and use feature called “Browse Revisions” :


A window is opening where you can see  the current version of the post at the right , and an old version at the left. All differences between them are highlighted :


A slider at the top of the screen ( in yellow above ) permits to select which old version to be compared. Slider size depends on the number of revisions available for this post. More than that, a checkbox “Compare any two Revision” ( in red above ) doubles the slider, you can then select both versions and compare two different old revisions.

Last point, you can restore an old version with the so called “Restore this revision” button ( in blue above ).

However there is one drawback related to revision control : it generates a set of data about older revisions that increase in the database used by WordPress. This increases the size of the database and can reduce the overall performance of the site.
In order to eliminate this problem, it is worth installing the extension “Thin Out Revision“. This extension supports multi-site. This will allow to perform the following actions :

  • thinoutrevisionsremove all existing revisions when the post is published for the first time, so all revisions done when writing the draft of the post
  • delete old revisions, anteriority being configurable.

The configuration of this extension is done through the options settings of the Dashboard, refer to the screenshot on the right.

Vincent Recipon

Propriétaire de ce blog. Owner of this blog.

You may also like...

4 Responses

  1. pravdamien says:

    J’ai un doute : dans l’environnement multisite, est-ce que ça supprime pour tous les blogs ou bien il faut procéder à du blog par blog ? Parce que l’extension apparait bien dans chaque blog, mais pas en network admin…

  2. darknote says:

    il faut penser de temps en temps à supprimer les posts revisions, il est bien d’utiliser le plugin wp-optimize pour tout nettoyer et optimiser la base de données.

    • Vincent Recipon says:

      Merci pour le conseil. Effectivement je ne me suis pas posé la question jusqu’à présent.

      Par contre j’ai bien essayé l’extension wp-optimize, mais dans mon cas cette extension est inutilisable. Elle n’est pas compatible multi-site et ne fait pas la distinction entre les tables MySQL qui correspondent à ce site et celles correspondant à d’autres.
      J’ai par contre installé le Plugin “Thin Out Revision” qui est lui clairement multi-site, et fait très bien le travail : suppression automatique toutes les nuits des anciennes revisions (ancienneté réglable) et suppression de toutes les révisions lors du premier post d’un article. Nickel.
      Ca me donne envie de remettre à jour l’article tout ça 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.