Changes between Initial Version and Version 1 of faq/drupal/upgrade

Sep 6, 2007, 11:39:21 AM (13 years ago)
Jamie McClelland



  • faq/drupal/upgrade

    v1 v1  
     1== Upgrade Drupal ==
     3May First/People Link will '''update''' your Drupal installation for you, however, we cannot '''upgrade''' your Drupal installation. The difference between update and upgrade is:
     5 * update - changing minor versions. Updates represent small changes, usually to fix bugs and security holes. In the Drupal 4 branch, examples of minor version changes are:  4.7.4 to 4.7.5. In the Drupal 5 branch, examples of minor version changes are 5.1 to 5.2.
     7 * upgrade - an upgrade means changing between major Drupal versions. That means going from 4.6 to 4.7. Or from 4.7 to 5. Or from 5 to 6.
     9Why doesn't May First/People Link do major upgrades? We would love to! However, it is a complicated process that is different for each site. In other words, we cannot automate the process, like we can for minor updates. If we upgraded everyone's Drupal web site we would have no time to do anything else!
     11If you would like to upgrade your site, here are directions for how to do that. If you are not comfortable doing this, and you are able to hire a developer to help, please [ticket:newticket post a ticket] of the type "Project/Need to hire someone" and we will try to match you with a techie.
     13'''Please note:''' If you primary host is, please add a support ticket. Upgrading Drupal on is a different process than upgrading on our other servers. In addition, these directions are for upgrading from 4.7 to 5.2. If you are running Drupal 4.6, you will first need to upgrade to 4.7 before you can follow these directions.
     15 * Assemble your team. To upgrade Drupal, you will need someone who is comfortable using the command line and using secure shell (ssh). If that is not you, you may want to recruit some helpers.
     17 * Plan the upgrade. You should be prepared to spend several hours upgrading your site. If all goes smoothly you won't need that time, however, it's better to be prepared. Before beginning, review all of the third party modules that you have installed. You can review these modules by looking in your web/sites/default/modules directory. For each module installed, search the web site to find the Drupal 5 version of those modules. If you can't find a Drupal 5 version of a module you are using you will not be able to use it! For each module, download the Drupal 5 version to your computer.
     19 * Make a backup! You will want to backup both your directories and your database. To backup these up, first, figure out what your database username and password is (see [wiki:access_drupal_database_directly here] for directions on how to do that). Then, ssh into your server and change into your site directory (the directory that contains your web, include, cgi-bin, etc. directories). Then, run the following commands:
     22cp -r -p web include/web.backup
     23mysqldump -u <db-username> -p <db-name> > include/drupal_db.backup.sql
     26 Replace <db-username> and <db-name> with your actual database username and database name. You will be prompted for your database password.
     28 * Login to your Drupal site as the user with User ID 1. If that user is mayfirst, then change the mayfirst user's password and log in as the mayfirst user. You must be logged in with user id 1 for the upgrade to work properly. If you are not sure what user id you are logged in as, click the My Account link in your menu and look at the web address you are sent to. It will say: /user/3 if you are user id 3. Or /user/1 if you are user id 1.
     30 * Go to your admin/settings page and check the box to indicate that your site is down for maintenance.
     32 * Disable all third party modules. Go to the modules admin section of your web site. Compare the enabled modules with your list of third party modules. Uncheck each third party module that is checked.
     34 * Secure shell (ssh) into your site. Move your old modules out of the way. From your web/sites/default directory, execute:
     37mv modules modules.4.6
     38mkdir modules
     41 * Run the change-drupal-symlinks-to-5 script. You will need to pass one argument to the script, which is the path to your web directory:
     44change-drupal-symlinks-to-5 /home/members/mayfirst/sites/
     47 * Now - your site is using the Drupal 5 code. Next, go to the update.php script on your site. The should be something like:
     49 * Follow the directions for updating your database. Copy and paste all the output in case you run into problems later - it will be useful to reference it.
     51 * Test your site. Remember - your third party modules will not yet be working!
     53 * One by one, add the drupal 5 version of each third party module to your modules directory (web/sites/default/modues) and enable it via Drupal. After enabling each module, return to the update.php script to run any needed database updates.
     55When you are done - report your results! Let us know how it goes. Edit this page to add new lessons learned.