Have you ever made a change to an article in a Joomla Website and realised you completely ruined the page and need to revert back to before you started?
A better question might be: who hasn’t?
Well in this post I am going to share with you how to do just that – version control in Joomla (as of Joomla 3.2).
How To Enable Content Versioning In Joomla
Before we start talking about content versioning, we should first ensure it is switched on.
- Go to Global Configuration > Articles and select the “Editing Layout” tab.
- Inside this tab there is the option to “Enable Versions” – you want to ensure this is set to “Yes”.
- Once you select “Yes” you will be asked to set the “Maximum Versions”. The maximum versions refers to the amount of previous versions of the article you are saving. I’d advise sticking to the default 10, as it’s unlikely you would need to roll back any further than that, however feel free to set this to whatever you like. That being said, keep in mind that the more versions you set here, the more data it will require.
- Lastly, click the “Save & Close” button to apply the updates.
Please note: Previous versions of Joomla called Enable Versions “Save History” – Same feature, different name.
Working With Joomla Content Versioning
Now that we have enabled content versioning, every time you hit save on an article, Joomla will automatically keep the previous version backed up for you to revert back to or just compare changes against.
You can view the previous versions of the article by selecting the “versions” button at the top of your article.
If you have only just enabled this feature, or you are working with a brand new article there will of course be only one version. So in order for you to continue on with this tutorial – make a few changes and save the article.
Looking At Previous Versions Of A Joomla Article
Inside the versions pop up box, you will see a list of dates you saved the article. To view how the article was on that date, simply click on the date and the information will open in a new window.
As you scroll down you will notice that it does not only store the main content of the article, it stores literally everything!
How To Restore A Joomla Article To A Previous Version
Once you have found the version of the article you wish to revert back to, simply click the checkbox next to the date and click the “Restore” button.
Your page will reload back to how it was on your selected date.
To apply these changes, click “Save & Close”.
Comparing Versions Of A Joomla Article
A great feature of Joomla content versioning is that if you want to compare two versions against each other you don’t have to manually restore the dates and look for the differences by eye.
You simply select the checkbox of whatever two dates you want to compare and then click on the “Compare” button.
This will open a new window that shows the full content of both versions along with the differences between the two.
If you want to only see the differences between the two versions, there is a button at the top you can select called “Changed Values”.
How To Prevent A Joomla Article Version Being Deleted
Once you have exceed your “Maximum Versions” limit (set earlier in this article), Joomla will remove an old version to make space for the new one.
If you want to ensure a version doesn’t get deleted, all you need to do is click the “Keep Forever” button on the date you want to keep – it should now say “Yes” in the Keep Forever column.
A good use for this feature I have found is when a page has seasonal changes. For example you might use certain imagery and content for the Christmas period and then change it back to normal after it’s over. Setting Keep Forever on this version of the article not only ensures it won’t be deleted – but having Yes set in the “Keep forever” column makes it very easy to find next year… or you could use a “Version Note”
Using A Version Note In Joomla Content Versioning
Another useful feature Joomla Content Versioning has is the ability to add a Version Note. This allows you to write a short reminder of the updates you made to the article on that day.
This is done each time before you save the article, outside of the versions pop up box.
It is located in the articles “Content” tab’s sidebar (to the right of the main content). You will see an input box entitled “Version Note”.
The Version Note can be very useful as it is visible inside the versions pop up box. So taking a few seconds out when you make your next update could save you hours later on down the line.
Deleting A Joomla Article Version
Lastly, if you want to delete an article version, this can be done through here also. Click the checkbox of the date you wish to delete and click the “Delete” button.
This may be useful if you are trying to save some space but I would avoid being too gung-ho with this feature because once it’s gone, it’s gone.
So Now You Know
I hope you benefited from this tutorial, now go out and share this with anyone that may benefit from it on social media.