How to update from a very old version of Craft? I'm trying to update an old site that is still running on Craft 2.2 (from September 2014), but unfortunately the update process to the current version (2.6) breaks.

Does anyone have any experience of upgrading a Craft site from several versions back? I'm thinking my best bet might be to try doing it in a series of steps by downloading intermediate versions from here. I'm wondering though if there are particular version numbers that are good milestones for updating (or best avoided)? (I half remember a version that had to be manually installed a while back) Or alternatively, whether there's a better approach I haven't thought of?

Update: the problematic step seems to be upgrading to 2.5. I've managed to run updates up to the last build of 2.4 but the jump from 2.4 to 2.5 always seems to fail. The error message is just "There was a problem updating your database", so it's hard to know what exactly is going wrong.
Ok, after a lot of trial and error I've finally managed to get this site upgraded. Here's a rough outline of the process and what the problem turned out to be:


First, I tried updating one minor version at a time. This led me to find that the problem seemed to be with updating from the last build of 2.4 to the first build of 2.5
The error message on update wasn't super helpful ("There was a problem updating your database"), but by trawling through Craft's log file (craft/storage/runtime/logs/craft.log) I found that the update seemed to be failing when trying to create the table elementindexsettings because (for whatever reason) that table already existed (resulting in the error Failed to apply migration: m150827_000000_element_index_settings).
I can't think why this would be the case, since after each failed update attempt I fully restored my previous database, but since my elementindexsettings table was empty, I dropped it and tried the update again. At this point it worked.


So in summary, the solution was:


Update to Craft 2.4.2726 (and commit this to version control!)
Attempt a manual update to Craft 2.5.2750. When this fails, drop the elementindexsettings table and try running the update again (ie. go to /admin and press the "Finish up" button.
Update to the latest version.


As a side note, I found setting Craft's backupDbOnUpdate config setting to false made the update process much faster and less painful when having to do a lot of attempted updates followed by rollbacks (though obviously if doing this be careful to make sure you have a backup you can restore if the process goes wrong).