Differences between revisions 10 and 11
Revision 10 as of 2012-08-26 10:20:22
Size: 3957
Editor: DanielPocock
Comment:
Revision 11 as of 2013-05-05 04:13:05
Size: 4061
Editor: GeoffSimmons
Comment: Add additional CategoryPermalink.
Deletions are marked like this. Additions are marked like this.
Line 84: Line 84:
## This page is referenced from http://www.debian.org/releases/wheezy/amd64/release-notes/ch-upgrading

Translation(s): none


Background

  • squeeze has drupal6

  • wheezy has drupal7 and no drupal6 package

  • no fully automated upgrade path exists
  • complexities are likely to arise with any non-core modules installed in a drupal6 system

The good news

  • For a simple site, with a few manual steps, an upgrade from the drupal6 to drupal7 package can be done in 10-15 minutes

The bad news

  • For a complicated site, it may be necessary to manually recreate the whole site in drupal7, maybe a few days work
  • This is bad news for people with many sites (virtual hosting)

How to do it

Server preparation

These are once-off steps to prepare the server. Whether you have one site or 100 sites on the server, these steps only need to be done once.

  • It is necessary (and safe) to install both the drupal6 and drupal7 packages concurrently
    • If your system is still on squeeze, you can get a drupal7 package from squeeze-backports
    • If your system is on wheezy already, you can get the drupal6 package from squeeze (manual download and install with dpkg)
  • Make sure you have the latest available versions of both packages
  • After installing, it is necessary to ensure that the /usr/local/share/drupal hierarchy is split by version
    • see 685333 for detailed instructions

Moving each site

You do not have to move all sites at the same time. You can do one at a time. Sites will run normally as Drupal 6 sites until you migrate them.

The process below can take as little as 10 minutes for a small site with no special modules.

  • Official migration steps are described in the upstream document, and you should review that before following the steps below
  • Make sure you have a full backup of the database and the filesystem.
  • Put the site in maintenance mode
  • Disable all non-core modules
  • Run the drupal6 version of the update script, to make sure the database is clean
    • for example, if your server is www.example.org, go to http://www.example.org/update.php

    • sometimes there are errors that can be ignored, for example, if you see an error "Can't delete table XXX", and the error says table XXX does not exist, then it means the table was already deleted on a previous update. Other types of errors need to be investigated more thoroughly.
  • In the apache2 virtual host definition, change references of drupal6 to drupal7:

vi /etc/apache2/sites-enabled/www.example.org
/etc/init.d/apache2 reload
  • Move the site config

mv -n /etc/drupal/6/sites/www.example.org /etc/drupal/7/sites/
  • Make settings.php writeable for the site (e.g. for www.example.org)
    •  chmod 0666 /etc/drupal/7/sites/www.example.org/settings.php 

  • Now go to the update script:
    • For www.example.org, it would be http://www.example.org/update.php

  • Follow the instructions carefully
  • Review any warnings very carefully
  • After you are happy with the upgrade
    • Make the settings.php file read-only again:
      •  chmod 0644 /etc/drupal/6/sites/www.example.org/settings.php 

    • click the link to go to your site's admin page
    • Review the status page for your site, make sure there are no errors
      • Use the URL path  /admin/reports/status  to access the status page

    • Take the site out of maintenance mode
  • Your site is now upgraded

Troubleshooting

  • Can't find the login page to login as admin after upgrade?
    • use the URL path /?q=user to access the login page
  • Theme doesn't work after upgrade?
    • use the URL path /admin/appearance to access the page for changing the theme


CategoryPermalink