[Image attribution: eric]
drush sup just doesn't work consistently.
The rational here is that if we break upgrade into 3 stages we'll minimize the risk of unintelligble errors. That and a hardcore prep stage will make everything much easier down the line.
This overview expects you'll already have your custom modules re-written for D7. The coder_upgrade module is a great starting point (don't forget to install grammar_parser as a library in the
Prep (steps 1-3)
- Set up your local/dev version of the current site
- Cut out all the dead wood, don't upgrade stuff that doesn't need to be upgraded, especially if you're going to be going through the exact same process more than once. That can easily happen, for example if you're going through once to document the process or if you need to create a test version of a live site that will then need to updated with current content. Be firm, and if in doubt cut it out, you'll always be able to add it back in later.
Stage 1 update core (steps 4-6)
Copy the current code base to a new folder (maybe alias the files folder if you need to, or you can override the location in settings.php
$conf['file_directory_path'] = OLD_PATH).
This should be relatively straightforward as by now most of the upgrade bugs have been resolved. Re-hashing the user passwords takes a long time - don't be put off by endless
User  updates as it batches the process - took 20 mins on my machine for 600K users.
Stage 2 update contrib including CCK (steps 7-12)
Here you list all the non-core modules and download them. The list ends up having all your custom modules in it too, but as they don't exist on drupal.org they won't be downloaded. In fact having all the modules downloaded will throw a few errors when
drush dl tries to download sub modules which are part of a larger package (e.g. date modules).
Stage 3 update custom modules (step 13 - lucky for some!)
You're own your own right here. The coder upgrade module is a great starting point
- Download site to local machine
- Evaluate current site. What can go? Delete it, make a list as you go. Ask about, does anyone actually use that module/feature whatever? You can probably re-insert it if you need to later.
- Does the site still work? If not return to 2.
sitesfolder without modules
- Replace core code with D7 code
In original site make a copy of currently enabled non-core modules:
> drush pml --no-core --status=enabled --type=module --pipe >! modules_enabled_non_core.txt
cdto new site, move enabled modules
mv ../old_site/modules_enabled_non_core.txt .
Use xargs to loop through and download contrib modules
> cat modules_enabled_non_core.txt | xargs -L 1 drush -y dl
drush updbagain until it's all done. Fix any errors, cheat if you have to and advance the
systemtable if you think that'll help.
Download and enable
content_migrateand new fields to replace the old CCK ones
> drush dl cck > drush en content_migrate > drush en image > drush dl references > drush en references node_reference > drush content-migrate-status #check status & download needed field types.
- Re-install your custom modules and theme and then perform the updates,