Migration - Joomla 1.5 - 2.5.1

Joomla 1.5.x range is coming to end of life in Joomla's eyes and this is a great milestone in regards to the ongoing development and life of Joomla as a Content Management System. There is alot of people that have used Joomla 1.5.x over the last few years and this means that there are alot of people who are going to be looking for a guide / solution to migrating to Joomla 2.5.1. I have gone through and compiled a general overview which will enable users and site owners of Joomla 1.5.x based websites to take their sites to the latest versions. This document is not going to be the most user friendly but at the end of the day this is designed to be a overview not a step by step instruction manual. The process of completing an upgrade to the latest version should take approximately 8 hours depending on what 3rd party extensions and modifications you have got done to your site.

 A few things that you should consider prior to performing the migration includes the amount of space that is required to complete the upgrade, what components are running and what template you are running. If it is a template from a template club you may be in luck as alot of them are providing 2.5.x compatible versions of their existing templates. If it is a custom build you are going to find this a little harder if you are not a developer. If you have not taken a backup of the website you will need to do this first. This is something that I personally believe you are around the twist if you dont as you may run in to troubles and have no rollback solution. Finally you will need to work out if you can get 2.5.x compatible components running. If there is an update for them or an option to download 2.5.x compatible versions you need to download them.

The process to complete the upgrade consists of the following things:

1) Preparing your existing Joomla installation for the migration.

2) Running through the JUpgrade process

3) Configuring your template to run in Joomla 1.6+

4) Installing the latest versions of Joomla, the components, modules and plugins running on your site

5) Testing

7) Deploying the site in to the live environment


Preparing your existing Joomla installation for the migration

Before performing the migration you need to first complete a backup of the Joomla installation. Depending on your hosting provider there should be an option to perform a backup from within your hosting control panel. If there isn't then it is ok you can do a backup using akeeba backup. Once you have completed the backup you will need to register for and download the JUpgrade component.

You should use this opportunity to review the site, its content, modules and components that are installed on your site. If there is anything you deem as no longer needed or are you are not using then you really should remove these. If there is no updates available for the Joomla components, plugins or modules you are running then you should ask yourself 3 questions. Firstly is that component a free one? secondly is there a need for this component after the upgrade and finally if there is no upgrade is there going to be one or has the existance of this component come to an end?

Once you have gone through these questions remove the ones you no longer need. Grab upgrades for the ones you can and store them on your computer. If you cannot do either then you should really be looking around for someone who can help you with this migration as it is not something you will be able to complete. I know this sounds harsh but this process can get difficult especially if you are not experienced in this process.

There are alot of providers that will be able to help you but you will have to keep in mind that it will come at a cost. I would strongly recommend that you consult the resources directory on Joomla for assistance first. If you cannot find someone who is willing to help you out then you need to allocate a good budget and to be honest $40-$50 for this support is not going to give you a decent result. Allow atleast $400-$1000 to be on the safe side.

The reason to cater for such a budget is for a few reasons. The most common is that if you are being charged at a per hour rate, which is going to be a the most likely outcome then you need to cater for atleast 8 hours labour. I know people will tell you "Rubbish it can be done in 2-3 hours." I also know that those people waste more of your time in getting it done and more importantly getting it running. There would be a few people within the Joomla community that I would trust to do this in that sort of timeframe. These people are usually extremely busy and they do know what they are doing so that will certainly come at a higher cost than you would have thought.

The other side of the coin is that you will probably end up using these people again for other things if they do a good job. You really need to develop such a relationship with those people and in order for them to hang around in the future doing this sort of work they need to be paid accordingly. Enough of this side note talk, I think you should get the point by now.

You should now be at the stage of downloading and installing the JUpgrade component, followed by enabling the MooTools Upgrade plugin.

Running through the JUpgrade process

This process is quite interesting if you are a bit of a closet geek. If you are not one, then this will be as entertaining as watching paint dry. The page at http://docs.joomla.org/Tutorial:Migrating_from_Joomla_1.5_to_Joomla_1.6 will show you screenshots and how to complete some of the things in this part of the migration process. You will notice when you load the JUpgrade component that you have the option to migrate straight to 2.5.x, from my limited experience and exposure to this particular upgrade path I did the foolish thing and decided "hell, why not go straight to 2.5.x it will save me time"... All I can say is "WRONG!!!!!" it sucked and failed miserably in my development environment. I had to delete the upgrade files created and start this process again. Not fun. On the second time round I ended upgrading to "Molajo" which was some beta of 1.6. That was ok. It worked without issue and just meant I was forced to take a step by step approach.

Once Molajo was installed I then progressed to the next phase of the installation. I logged in to the administration area of the website. I then mentally created a process of things I had to do. This included getting the site template first. I had a custom template which I had built sometime ago. It was not an overly complex template so it didn't take me as long as say one from a template club would. This process ended up taking about 1.5 hours to complete as there was code I ended up having to rewrite for the most effective upgrade of the template was taken.

Once I did that I had to install the template again through the extensions manager followed by reactivating it as the default. This is not a hard process but one of the things that has changed is the ability for the templates to be manually installed. This has many positive benefits which I wont cover but as a developer I can say that it is logical and actually something which I feel should have reared its head in 1.5.x.

Finally I got to see how the site looked. While for most people they may have been disappointed in a big way I wasn't overly surprised as it was something that most would expect if they have done upgrades like this on other software. This being said it was not as bad as other software I have used in the past.

From there I started looking at certain aspects of the site and I feel now that I shouldn't have worried about it too much as it would have most likely changed once I got in to the testing phase later on.


Installing the latest versions of Joomla, the components, modules and plugins running on your site

One very very cool feature that was introduced in to the Joomla 1.6 range was the integrated upgrade feature. This is one thing that will eliminate a huge chunk of the upgrade process in to the future. Not being new to Joomla 1.6 I went straight to the extensions manager and did a search for the latest upgrades. Sure enough the 2.5.1 upgrade was listed. Now this was where it got a little fun to say the least. I attempted to do an upgrade but due to a known bug with the upgrade process I was not able to do the upgrade directly. I in turn posted in to the Joomla Bug Tracker a post explaining the upgrade issue and while I was fairly positive it had been documented. I figured I would post it there just to be safe. Sure enough it had been documented as a known issue it just had not been applied as yet so it may still apply when you read this post.

The solution and information relating to this is below. It will take a bit of effort if you do not understand the upgrade process and where the database files are stored you will find them in the /administrator/components/com_admin/sql/updates folder.

in the file 1.7.0-2011-06-06-2.sql 

ALTER TABLE `#__languages` ADD COLUMN `ordering` int(11) NOT NULL default 0
AFTER `published`;
ALTER TABLE `#__languages` ADD INDEX `idx_ordering` (`ordering`);

Please note you could make this file redundant for this update as the columns
already exist.
Continuing on performing this update I have received the following:

Duplicate column name 'sitename' SQL=ALTER TABLE `j17_languages` ADD COLUMN
`sitename` varchar(1024) NOT NULL AFTER `metadesc`;
SQL =

ALTER TABLE `#__languages` ADD COLUMN `sitename` varchar(1024) NOT NULL AFTER
`metadesc`;

FIX: Remove the file 1.7.3-2011-10-19.sql

There are a couple of more small ones that popped up but you will quickly work these out. It was just a matter of scanning through the sql files. Once I had made the corrections the upgrade went straight through and before I knew it I was at 2.5.1. Now for the fun part reinstalling components!

This process was just more of a time related issue rather than a hassle. I was even able to export most of the settings from the original component installation in the Joomla 1.5.x installation so that made things quicker in relation to ensuring the settings where exactly the way they were originally.

After all of this was completed I was ready to progress to the testing phase.

Testing & Deployment of the site

This is one part of the process which took a little amount of time as the site I was upgrading / working on was not overly complex. If I had a few components big components like Virtuemart or Mosets Tree running then it would have been a different story.  I still treated this part as a vital process and as though it was the most important part of the upgrade process as it would ultimately reflect on the quality of the site after the upgrade. This in turn could have surverely damaged the reputation of the site in question. Given that this site gets a bit of traffic but doesn't have complex features it just made sense. I guess I am saying no matter how big or small the site do it the right way the first time otherwise it could affect your public perception as the owner of the site.

Testing of the site included things like load speeds, browser compatibility, testing of forms and other functions that required visitor interaction of the site. I then decided to make some improvements to the way that a few things worked and once I was happy with the result I then proceeded to deploying the site to the live environment. This is one part of the process which can be time consuming itself as it requires the moving and deletion of some files and tables within a database followed by the process of moving this updated version of the site to the live environment.

This leads to the end of the migration process. The upgrade is now completed and for the forseeable future there will be smaller upgrades that will take place which will not require major migrations like the one I have just documented. While I realise the process it is something that I hope you have got some direction with and a good understanding of what sort of work is required. It is a major upgrade and one that with a bit of luck should not be required for time to come. If you have any questions please feel free to drop me an email by emailing neil (at) nultz.com.