One of the tasks I had to perform less than a month ago was to migrate a site from Joomla! 1.0.15 to Joomla! 1.5.x. The site's operation couldn't be suspended for more than a few minutes. This was an exceptional challenge for testing JoomlaPack's tools in a real world task. Let's sum up the mission objectives and get to work:
- The original Joomla! 1.0.15 site must be upgraded to the latest Joomla! 1.5.
- The same or equivalent components will be used without loss of data, especially in regards to translation and mailing list contacts.
- The site must have virtually no downtime; a maximum of 10 minutes is acceptable.
- The resulting site must be fully operational. No broken links, missing images or any other mishap will be tolerated.
Sounds like Mission: Impossible, right? Impossible is nothing, as long as you have the right tools.
Step 1: Back the old site up
One of the things experience teaches up - albeit in a harsh manner - is that things can and will get awry, unless you're prepared for the unthinkable. In this case, the unthinkable is to bring the whole site down by accident, without a way to get it back online to its previous state.
That's why I used JoomlaPack 1.2.b1 (right then it was in a pre-release state) to get a snapshot of the site. Since this was a J! 1.0.x site, I used the -j10 package, which is Joomla! 1.0.x native. In 5 minutes flat the backup copy was sitting happily archived on my hard drive and USB key. I know, but redundancy makes me feel safer.
Step 2: Define the migration strategy
One of the common misconceptions is that when it comes to migration you can only act on a live site. Right? Well, since I did have a site snapshot at hand and a XAMPP for Linux powered machine on my desk, the only safe decision was to try migrating on a locally operated "clone" of the site. The result could be then uploaded and deployed within minutes on the live server.
Furthermore, I decided to have a "safe haven" should the restoration go wrong. For this reason I created a subdomain, with the intent to put the old site in it. It was actually easy; after uploading the site backup archive and kickstart.php I merely clicked my way through the restoration procedure and - presto! - the clone was right there, in the new subdomain.
During this process I also safely checked Kickstart's compatibility with my live server. It turns out that even when I deactivated PHP's Safe Mode, I was still unable to get Kickstart to work. Some head-scratching later, it turns out that the site's root was not writable to the web server user. I just connected to the server with my FTP client and changed this folder's permissions to 0777. That did the trick. This was a useful thing, since I used my newly found knowledge to "fix" the permissions on my main domain's site root folder to avoid any troubles during the restoration of the migrated site (more on that later!).
Next, I repeated the procedure on my local server. Now I had a perfectly working "clone" of the live site on my local server. It's time to have some fun!
Step 3: The actual migration process
It turns out migration isn't as straightforward as you might have thought, or read about. After a couple of frustrating attempts, I came up with the right (as in "worked for me") procedure:
- Install the migrator component on the original Joomla! 1.0.x site
- If you had translated the site using Joom!Fish, you'll have to install the respective plugins. Too bad they're only available in their SVN and you have to guess that they even exist! I don't want to be too harsh; after all at the time of this writing Joom!Fish 2 is still in beta. Installing them is simple. Just download the plugins and tables folders and place in the com_migrator's corresponding folders.
- Run the migrator component, which results in a SQL file. Keep a copy of it, you'll need it.
- Make a new folder for the 1.5.x site and extract the latest Joomla! 1.5 distribution there. Do not run the installer yet!
- Copy the SQL file in the new site's installation/sql/migration folder.
- Make sure the installation folder, subfolders and all contained files have read/write privileges for everyone.
- Run the Joomla! installation, making sure you select the migration content instead of sample content towards the end of the installation. Tip: Use the same prefix as the old site. Hopefully, nothing went wrong in the process. If not, you'll have to copy the SQL file again and then retry the process. During migration the SQL file gets altered. Why does it have to? Beats me.
- You have a semi-usable site now. Copy over any media (like, images) from the old site to the new.
- Install third party components. Remember that you need to activate the Legacy Plugin for components which are not Joomla! 1.5 Native (that's about 80% of the components I guess).
- If the components offer no backup/restore for their data, copy their tables from the old site's database to the new site's database.
- Make sure everything is in working order. Otherwise, keep on tweaking.
Step 4: Getting ready for transfer
After all this process was over, I had a fully working site on my local server, all aspects tested out and everything to the client's liking. The next step is to get it online. JoomlaPack to the rescue!
I installed the 1.2.b1 release, using the Joomla! 1.5 Native -j15 package, so I hadn't have to activate the Legacy plugin. In less than 4 minutes a snapshot of the shiny new site was ready on my hard drive. Hey, that was easy!
Step 5: Showtime!
The big moment is here. Everything has to be done in military precision. The site is not to be left off-line for more than 10 minutes. Hey, don't panic. It is really easy, trust me!
First off, I made sure the site's root folder permissions were 0777 and that PHP Safe Mode was disabled. This will keep headaches away later in the process. Then, I uploaded kickstart.php and the new site's backup archive.
I now needed a way to remove the old site and restore the new one. I chose to use SSH to remove the old folders. I could as well have used FTP, but removing the thousands of Joomla! files with FTP takes forever, especially if your host doesn't allow multiple concurrent FTP connections from the same IP address. A few seconds away everything was gone, except kickstart.php and the archive.
Up next, I used Kickstart to get the archive unpacked, ran the installer to get my site restored and than clicked on the relevant links on Kickstart's page to get rid of kickstart.php and the archive.
Phew! Everything was ready now. A quick test and I was done.
Conclusions
JoomlaPack and its accompanying scripts can play an important role during site migration to Joomla! 1.5.x. The steps you can use its time and frustration reducing services are:
- Backing up the original site (JoomlaPack, J! 1.0.x package)
- Making a local clone of the original site (Kickstart, JoomlaPack Installer 2)
- Creating a snapshot of the new site (JoomlaPack, J! 1.5 Native package)
- Deploying the new site (Kickstart, JoomlaPack Installer 2)
JoomlaPack's multipurpose functions as a site backup and cloning tool can save you time during the migration process, letting you focus on the important part: transferring data to the new Joomla! version. It can provide you with confidence that the end result can be deployed in a matter of minutes, without risking bringing down the live site during the migration process, or to iron out migration-related issues discovered along the way.
But if you don't believe me...
... I can prove my success story. Yes, I know what you're thinking. I am JoomlaPack's author, so it is reasonable - if not selfish - to praise my software. You might even think I made this all up.
The example is very real and the only pitfall in the process was the initial migration (the migration only worked when I copied the darn SQL file instead of HTTP uploading it).
Need more proof? The site I was talking about is that of the Hellenic Association for Adult Education. The new site, facelifted is here, whereas the original site's clone is here. As you can see, the content is there, just the forum format and software changed and the past newsletter issues have been temporarily removed, on client's request.
If you do believe me, after all, ...
... you can use JoomlaPack on your site today. If you have a great success story about how JoomlaPack saved the day for you, send it to us.