technonaturalist

image link to hive image link to ko-fi

Drupal 7 upgrade from HELL

posted on: Monday, 17 December 2012 @ 8:41am in
tagged

Modded to be slightly more useful as I wrote the other one while slightly delirious.

  • upgrade to latest D6
  • drush arb default --destination="wherever/you/like"
  • mysql update systemsetstatus='0' where filename like 'sites%'
  • delete 6.x, retain /files and /sites directories, remember any mods to .htaccess
  • drop in 7.0 files
  • drush updb
  • if no error, press y
  • if error occurs, make a note of what you need to do to fix it. If this is a repeat run, fix all errors noted
  • rename/move your Drupal directory (or delete it but in the event you need it later)
  • from above where the Drupal directory should be, drush arr [backup-filename-without-square-brackets].tar
  • repeat from 3 til everything works
  • drush up -y
  • go do all the other little bits and pieces you need to do with the theme and modules

Problems I hit

  • managed file duplicates: mysql select * from `files` where `filepath` like `%string%'; delete from `files` where `fid`='number'; I only had a handful to deal with at any one time so didn’t mind doing them one by one, you’ll probably want a script if you have a lot :)
  • comment stupidity: drop index comment_uid on comments; drop index last_comment_uid on node_comment_statistics;