How to use version control in Joomla 3
In this tutorial:
Joomla 3.0 / Joomla 3.1
Version control was not introduced until 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
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
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
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
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.
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
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.
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.
Joomla Community Google+ Hangout #3
June 3rd, 2014
Thank you @RustyJoomla for letting me speak on the Joomla Community Google+ Hangout!
Support Center LoginOur Login page has moved, Click the button below to be taken to the login page.
Writing Articles in Joomla 3
|1.||How to write a new Article in Joomla 3.1|
|2.||How to feature an article on your Joomla 3.1 homepage|
|3.||How to change the URL alias of Joomla 3.1 articles|
|4.||How to create a new Article Category in Joomla 3.1|
|5.||How to Assign an Article to a Category in Joomla 3.1|
|7.||How to link to another article in Joomla 3.1|
|8.||How to use version control in Joomla 3|
2018-02-23 2:44 pm
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.
2018-02-23 3:21 pm
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.
2017-01-10 6:44 pm
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?
2017-01-10 6:56 pm
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.
2014-09-24 4:59 pm
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.
2014-09-24 5:06 pm
Of course, be sure to back up your database before making any changes, but emptying this table should be fine.
2014-09-24 5:20 pm
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?
2014-09-24 7:28 pm
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.