Differences between revisions 3 and 5 (spanning 2 versions)
Revision 3 as of 2012-08-25 21:04:53
Size: 2144
Editor: DanielPocock
Comment:
Revision 5 as of 2012-08-25 21:33:32
Size: 2856
Editor: DanielPocock
Comment:
Deletions are marked like this. Additions are marked like this.
Line 33: Line 33:
The process below can take as little as 10 minutes for a small site with no special modules.
Line 35: Line 37:
 * Make sure you have a full backup of the database and the filesystem.
Line 44: Line 47:
 * Move the site config

{{{
mv -n /etc/drupal/6/sites/www.example.org /etc/drupal/7/sites/
}}}
Line 45: Line 54:
  * {{{ chmod a+w /etc/drupal/6/sites/www.example.org/settings.php }}}   * {{{ chmod 0666 /etc/drupal/7/sites/www.example.org/settings.php }}}
Line 47: Line 56:
  * For www.example.org, it would be http://www.example.org/ugprade.php   * For www.example.org, it would be http://www.example.org/upgrade.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
  * Take the site out of maintenance mode
 * Your site is now upgraded

Background

  • squeezy 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)
  • After installing, it is necessary to ensure that the /usr/local/share/drupal hierarchy is split by version

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
  • 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 upgrade script:
  • 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
    • Take the site out of maintenance mode
  • Your site is now upgraded