Upgrading Your Sitefinity 3.X Website to 5.0
Sitefinity Upgrade Success …
The likelihood is, that if you are perusing this article, then you have already had the dreaded discussion regarding upgrading your Sitefinity 3.X website to the latest version. Popular belief has it that this is a challenging task which really can be riddled with bugs and complications. It is possible to 'shrug off' all the frequently talked about pit falls though when you're conscious of the procedures to adhere to and what to plan in advance for.
Through this informative article, I hope to reassure you by outlining the basic procedures for moving a website from Sitefinity 3.X to Sitefinity 5.0. I will be explaining processes that I followed and issues I experienced in bringing up-to-date our company website and exactly how I was able to overcome them.
Our company website was updated from Sitefinity 3.7 (now quite an old version) to version 5.0 (which was launched Feb / Mar 2012), for that reason, this article will primarily concentrate on websites currently using Sitefinity 3.6 and 3.7 wishing to upgrade to Sitefinity 5.0 and some information may not be applicable to lower versions.
Hmm … To Upgrade Or Migrate?
When we initially decided to update the Light Speed website, I was faced with a sudden fear. My apprehension was caused by the unknown workload and problems that could gather through updating the website from such a low version to the latest version of Sitefinity. Desperate to allay my fears I became a frequent visitor to the Sitefinity Online community and Google sites looking for any relevant information that could aid me along the way. After viewing various blog posts and forum threads, it became obvious that there was some misunderstandings regarding 'upgrading' or 'migrating' Sitefinity. Therefore, this was throwing people away from the correct procedure on how to update their website.
After in depth research I stumbled upon some other posts and threads, which were hidden out of sight, that finally helped me to get a clear comprehension of which method Iought to use to update the Company website. There are two particular methods.
1) You can 'Upgrade' a site, which basically means updating the Sitefinity version that the current site is running on
2) You can 'Migrate' a site [Sitefinity have provided a tool called The Migration Module] and this process enables the moving of content and data from one site to another (although be warned that not everything gets copied). Migration has had to be introduced by Sitefinity because from Version 4 onwards the program significantly altered the architecture from the one that implemented in version 3. The Migration Module was created to migrate a Sitefinity site created using version 3.7 (using service pack 4) to Version 5.0. Because of this if your web site is prior to 3.7 it must be 'Upgraded' to this spec BEFORE it can be migrated to Sitefinity 5.0.
Because the company site was created on version 3.7 this mean that I would have to create a new Sitefinity 5.0 website and using method 2 migrate the vast majority of content and data from my Sitefinity 3.7 website.
The Minimal Requirements for a Migration
There are some prerequisites and advisories so that you can successfully complete a site migration from Sitefinity 3.7 to Sitefinity 5.0. Firstly the site to be migrated must be running on IIS (this can be running locally). Secondly, it is advised that the new Sitefinity site should have a similar file structure as the old site. This allows the migration to run smoother as Sitefinity will notify you when it can not find certain files such as templates and themes. I therefore manually copied files such as the templates and themes across when I first built the Sitefinity 5.0 site. Thirdly, the site must be using Sitefinity 3.7 SP4 with either ASP.NET 3.5 or 4.0 .
If your site is not currently using Sitefinity SP4 then upgrade to it before you actually do anything else. Upgrading to SP4 can be carried out by downloading a patch or 'hotfix' from your Sitefinity account downloads section, however, it is important to ensure you are downloading the correct version and edition (ie Standard Edition). Ensuring you have backed up your project, you need to unzip the patch folder and copy the files directly into the root of the site. You will then need to merge and overwrite some files including the web.config file. Once complete, you can check your version number to see if the site is now running on the new service pack.
Preparation, Preparation, Preparation …
Although the original site is now running on 3.7 SP4, it still must be prepared before the migration begins. There are 2 methods of preparing the site; 'automatic' or 'manual'. Automatic enables you to prepare your 3.7 site for migration by opening your Sitefinity Project Manager, clicking actions and setting the SF3.7 site for migration. Then you're able to follow the prompts to complete the preparation. However, for the Light Speed site, I decided on the manual method where I was able to download the required zip folder from the root of the new project and copy the 'MigrationService.svc' file to the root of the 3.7 project and then copy the 'Telerik.Sitefinity.Migration.dll' and 'Telerik.Sitefinity.MigrationContracts.dll' to the bin folder of the 3.7 site. Once completed, I then entered the following code before the last configuration tag in the 'web.conifg' file:
start of 'system.serviceModel'
'servicehostingEvironment aspNetCompatibilityEnabled = "true"
end of 'system.serviceModel'
The Sitefinity 3.7 site will now be prepared for migration.
From Old To New
Now that the entire preparation is taken care of, the old 3.7 site can now be migrated to the new 5.0 site. However, it is important to note, as mentioned earlier, that not everything is certain to get copied across the new site, so it's very important to take these into consideration, particularly if your original website included lots of custom work such as master templates , themes or user controls. For a full list of what is included and what is not, you can visit the 'Considerations' section of 'Sitefinity 5 Migration Guide'.
After running your new Sitefinity 5.0 Project, you will find a link on the Dashboard saying 'Migrate your site from Sitefinity 3.7 to the newest version'. Clicking this link will launch a wizard that will request the URL of the Sitefinity 3.7 website. You will then be ready to select what content, data and files you would like to migrate over to the new website. Once these details have been confirmed, it will take a few moments to run through and migrate everything. If everything has transferred happily you should just observe a group of green ticks together with a successful report. However, you will additionally be advised of any files that are unsuccessful which will usually come down to an issue with Sitefinity not being able to locate the required file or it will be a file which can not be migrated has not been actually copied over ahead of the migration.
If the migration has actually been successful, then almost all content and pages etc should now appear on your new site, but the site will most likely be far from complete.
Light At The End Of The Tunnel
After the fact that the migration is finished, you will find a fair few tasks to complete. Aside from going through testing the entire site, certain areas will need changing beforehand. In most cases any custom controls or control templates which have been developed for use with the 3.7 site will need to be adjusted or completely remade. You also might discover that you will have to make various changes in your CSS for the reason that mark-up furnished by Sitefinity 5.0 differs very much from the mark-up used in Sitefinity 3.7. A good example of this can be found when utilizing Sitefinity's navigation control where in Sitefinity 5.0 is appears to readily heavily on multiple spans.
When all of these changes are completed, you'll be able to judge whether or not the site is complete. Yet, it would be good to incorporate a tested run through your entere site, both on the public side and the admin side to ascertain if there are any other areas missing functionality or merely not displaying as they should.
So … What Did We Think?
It seems like the original conversation about updating the website happened a long time ago, and yet here we are! We have got a fresh Sitefinity site with all the original data and content obtained from our old site. Sure we had to make some additional adjustments and tweak odds and ends here and there, but finally the new site is there. So how do we feel about the process of getting it there?
Well, everyone will have their own opinion on the migration method and whether or not it is justified for the amount of work required. However, my thoughts in regards to the process vary. On the one hand I can see how useful the tool is at getting your out-of-date website immediately up to a new site so that you can explore the latest features which Sitefinity 5.0 can bring to the table. However, on the other hand I'm facing the realization that I have had to perform a lot of preparation work to get the original site ready for migration plus I had to put together a new site and copy most of the files over manually anyway. Additionally, even once the migration has been completed, I still was forced to rewrite almost all of the custom control templates and user controls. Being mindful of this, I ask myself whether or not it would be quicker to produce a new site and just replicate the changes manually, rather than adhere to the migration option.
It appears to be to me that this entire process may just be dependent on what type of site you want to update.
For example, a sizable enterprise site with 50 pages or even more would certainly benefit from migrating to a new site, where as a lesser company site with 20 pages or less may very well be better off developing a new site, copying as many files over as possible and after that replicating the page subject material on a page by page basis.
As I said, It's my opinion that everyone will have a different take on how to approach upgrading their website, soonheless I believe that most of the people who complete an update are going to be reviewing their methods the moment they have completed a full site migration .