How to use version control in Joomla 3

In this tutorial:

Joomla 3.0 Joomla 3.1 Joomla 3.2

Joomla 3.0 / Joomla 3.1

Version control was not introduced until Joomla 3.2.

Joomla 3.2

A new feature in Joomla 3.2 is version control. This tool allows you to save previous versions of your articles, and also allows you to revert to any previous version at any time. In this tutorial, we will review how to use the new version control system.

Getting started: Editing an article

Joomla example article

When you install Joomla 3.2, the version component is setup and enabled by default. In our testing, we installed Joomla 3.2 with the Default English (GB) Sample Data. As you can see to the right, our homepage shows the Getting Started article, and this is the article that we will be working with in this tutorial.

The first thing we’re going to do is edit the Getting Started article. To do this, log into your Joomla dashboard >> Content >> Article Manager >> and then click on Getting Started.

New article, no revision history yet

No Version History shown

In the top menu, you will see a button that says Versions. If you click it now, it will open the Item Version History window. It is blank at the moment, because we haven’t made any edits to the article just yet.

Making our first edit

Making first test edit

In our testing, we added first test at the top of the article. In the right sidebar, under Version Note, we typed the following note to remind us of the changes we made: Made a simple edit to the article, added “first test” to the top. When we finished editing the article and typing a Version Note, we clicked Save in the top menu.

For the sake of testing, we made another edit. We added second test at the top of the article, and saved it with a similar Version Note.

How to view previous versions of an article

Version History with 2 edits

To view previous versions of an article, click the Versions button towards the top of the Edit Article page. The Item Version History page will show, and you will be able to see a listing of the previous versions of the article.

How to preview previous edit

To see what a specific version looked like, click on the version’s Date. Another window will open, showing you a rough version of the article. As you can see in the screenshot to right, we clicked on the “first test” edit we made, and the change can be seen in the Intro text.

How to restore a previous version

How to restore a previous version

Restoring a previous version of an article is easy! On the Item Version History screen, after finding the version you want to restore, click the checkbox next to the article version and then click the Restore button. After the article restoration has completed, you’ll see a message similar to the following:

Prior version successfully restored. Saved on 2013-12-12 12:59:38 Made a simple edit to the article, added “first test” to the top..

How to compare different versions of an article

Sometimes it may be hard to tell exactly what changes were made based upon the Version Notes that you enter. However, using the Compare feature, Joomla will show you a side by side comparison of two different versions of your article.

How to compare different versions of an article

To compare two versions: On the Item Version History screen, check two versions of your article and then click the Compare button. A new window will open showing side by side comparisons of the versions you chose. Under the Changes column, text added will be highlighted green and text removed will be highlighted red.

How to limit the number of versions saved

If you edit articles frequently, the number of different versions saved can grow quite large over time. This can make it difficult to find the version you’re looking for, for example, if you have 100 or so versions of the same article saved.

Maximum Versions saved is 10 by default

The default value for the maximum versions to save per article is 10. When you save an article and the max version save count has been reached, Joomla will delete the oldest revision to make room for the new one. You can easily change how many revisions are saved by adjusting the Maximum Versions setting. To do so:

Changing the Maximum Versions saved setting

In the top menu of your Joomla admin dashboard, click Content >> Article Manager >> Options (at the top right of the page). Then, click the Editing Layout tab, change the Maximum Versions setting, and finally click Save & Close.

How to prevent a previous version from being deleted

If you don’t want a particular version of an article deleted when the Maximum Versions limit has been reached, you can lock the version to prevent it from being removed. To lock a version, on the Item Version History screen, simply click No under Keep Forever. This will change the value to Yes, and prevent the version from being removed.

9 thoughts on “How to use version control in Joomla 3

  1. Table jos_ucm_history is bigger that jos_content. Can i clean jos_ucm_history (not delet whole table only remove its “content”). My joomla site is ver old – almost 10 year – startet form jommla 1.5 – upgarde to 2.5. x – and now is ver. 3.8.5. 

    1. Hello!

      I would recommend making a backup prior to modifying your database in this manner. This will ensure that any negative effects that appear after manipulating the database can be rolled back using the backup you create. I don’t believe that it would be a problem to delete that content. From this post in the Joomla! forums, it appears to be a feature to store revisions to your articles, if enabled in the settings. I would try turning off that setting and/or reviewing the settings to see if there is a way to clear your revisions, rather than dumping the data from the database itself.

      Best Regards,
      Carlos D

  2. Thank you for sharing this information.  I know I’ve used this feature before, but today when I really needed it, I discovered it has been disabled.  Is this feature now off by default in newer versions of Joomla?

    1. The options you are looking for should be available under “Content History”. This is a feature available in new versions of Joomla under the Article Manager > Options.

  3. No! Actually not. I tried renaming the three tables and creating three empty ones instead, just to be safe.  After a few minutes, I noticed that all my tags were gone in my “Popular Tags” module. When I reverted to the two older version of the tables, the tags were back.  So it turns out that ucm_history and ucm_base contain information regarding the article tagging.  Beware to not delete!

    1. Andre,

      Thanks for your quick reply. As you mentioned in your reply – the UCM_HISTORY and UCM_BASE tables should not be removed as they it affects other data. I removed my previous reply in order to make it clear.

      Regards,
      Arnel C.

  4. Thanks for the quick answer! What about ucm_history and ucm_base? Are they also related to the content versioning? Could they be emptied as well or is it best to leave them alone?

     

  5. Thanks for the article. I recently migrated my site from Joomla 1.5 to 3.3 and I noticed that I have a huge ucm_history table in my database (16.5 MB) that presumably contains old versions of articles that I don’t need. Can I get rid of these by emptying the table or will this crash the site? I’m surprised there doesn’t seem to be an option in Joomla to clear old versions without having to go through each individual article and delete them one at a time.

Was this article helpful? Join the conversation!