Acquia Drupal Stack - Keeping your local installation up-to-date
Upgrading components in a stack installer installation
Once you are running a website on your computer that you installed using the Acquia Drupal Stack installer, you will need to keep it up-to-date as new module and Drupal core versions are released. The stack installer does not provide this functionality, it only takes care of the initial installation and configuration phase.
How do I know what needs updating? The update status report.
The Acquia Drupal stack installer automatically activates the Drupal 6 Update Status module. This module keeps tabs on the modules you activate on your site and whether you are using the latest versions available. Go to the update status reports page at Administer > Reports > Available updates (?q=admin/reports/updates).
Here, you can clearly see if your Drupal core code and modules are up-to-date. Modules with newer versions available have a red background and provide links to the latest versions.
If you can't access the available updates page, check that the Update Status module is activated. Go to the modules page at Administer > Site building > Modules (?q=admin/build/modules), make sure the checkbox is selected next to the Update status module in the "Core - optional" field group. Click the "Save configuration" button at the bottom of the page.
Check the Update Status module's settings on its "Settings" tab at Administer > Reports > Available updates (?q=admin/reports/updates/settings). Make sure the option "All newer versions" under "Notification threshold". You can also enter your e-mail address on this page, so that your site will notify you when newer versions are available. Save any changes you make by clicking the "Submit changes" button at the bottom of the page.
If your Drupal core is out-of-date
Summary
- Backup - site files and database
- Housekeeping - run database update script
- Download + extract new core version
- Move customized files
- Run database update script
Login as User 1
For the next steps, it is essential that you are logged in to your site as User 1. This is the "administrator" user set up by the Acquia Drupal stack during installation.
User 1 - the user whose profile path is http://example.com/user/1 - is the first user created on any Drupal site, always has all administrative privileges, and there are certain tasks that only User 1 can carry out.
1. Backup
Make backups of your site's files and database. These will be your fallback if something goes wrong during the following steps. Test your backups to be sure you can restore your site if necessary. See Appendix C of Getting Started with Acquia Drupal - Backing up Drupal Websites for further information and instructions.
2. Internal Housekeeping
Database update - Login to your site as User 1. Check the "Database updates" row of the status report page at Administer > Reports > Status report (?q=admin/reports/status). Run the update script if needed (navigate to example.com/update.php in the browser and follow the instructions presented to you) to ensure that all pending database, configuration updates, and clean-up tasks have run.
3. Download Update Archive
Download Acquia Drupal to your computer. The latest version is available, as a .zip or .tar.gz "tarball" archive, from the Acquia download page.
4. Update the Acquia Drupal Core
-
Extract the archive on your computer, using tools you are familiar with. This makes a directory called, acquia-drupal-a.b.c. Place this directory in the directory containing your local Drupal installation's directory, /acquia-drupal.
- The standard Windows location is C:\Documents and Settings\Administrator\Sites\acquia-drupal-site
- The standard Mac OS X location is: /Users/[username]/Sites/acquia-drupal-site
-
Delete the following from the new
acquia-drupal-a.b.c directory:
- .htaccess (file - only if customized in your current code base, if not, do not delete)
- robots.txt (file - only if customized in your current code base, if not, do not delete)
- sites (directory)
-
Copy the following files and directories from the existing /acquia-drupal directory into the new acquia-drupal-a.b.c directory:
- .htaccess (file - only if customized)
- robots.txt (file - only if customized)
- sites (directory)
- modules\acquia (directory)
Copy over anything else you customized that is not contained in the drupal\sites directory, like the drupal\files directory from your current /acvquia-drupal directory into the new acquia-drupal-a.b.c directory.
-
Rename the acquia-drupal directory acquia-drupal_old - this is now a backup of your site's code.
-
Rename the acquia-drupal-a.b.c directory acquia-drupal - this is now your site's document root directory.
-
Run the update script (navigate to http://example.com/update.php in your browser and follow the instructions presented to you). The script executes any update functions that are present in the newly installed code that weren't present in the old code. This process makes any changes to your database that are needed for the newer versions of Drupal and its modules; also making your code ready for upgrading to Acquia Drupal.
As long as the update script returns no errors, your core code is now updated to the latest version of Drupal 6.
If modules are out-of-date
Now Make a Backup
Make new backups of your site's files and database. These will be your fallback if something goes wrong during the following steps. Test your backups to be sure you can restore your site if necessary. See the Backing up Drupal Websites appendix of the Acquia Getting Started Guide for further information and instructions. You can download the guide from http://acquia.com/downloads.
Summary
- download the latest module version archive to your computer
- delete old module directory
- unpack the module tarball in the appropriate location (see below)
- Run database updates script
- repeat steps 1-5 for each module
1. Download Latest Module Versions
For each module that the Update Status module indicates is not up-to-date
(see above), click the "download" link on the Available updates page at
Administer > Reports > Available updates
(?q=admin/reports/updates) to download the latest 6.x version tarball to
a directory on your computer. It will be called something like:
example-6.x-1.0.tar.gz.
Save it in the directory where the out-of-date module directory is located:
-
Windows
- C:\Documents and Settings\Administrator\My Acquia Drupal Site\drupal\sites\all\modules for modules you installed yourself
- C:\Documents and Settings\Administrator\My Acquia Drupal Site\drupal\modules\acquia for modules included in the Acquia Drupal distribution installed by the stack installer.
-
Mac OS X
- /Users/[username]/Sites/My Acquia Drupal Site/drupal/sites/all/modules for modules you installed yourself
- /Users/[username]/Sites/My Acquia Drupal Site/drupal/modules/acquia for modules included in the Acquia Drupal distribution installed by the stack installer.
2. Connect to Server - Delete Old Module Directory
Delete the directory of the outdated module version you are replacing in:
-
Windows: drupal\sites\all\modules or drupal\modules\acquia.
-
Mac OS X: drupal/sites/all/modules or drupal/modules/acquia.
3. Unpack Module Tarballs
Unzip/extract the example-6.x-1.0.tar.gz module tarball in
the appropriate directory with any compression/extraction tools you are
familiar with. A new module directory will be created called
example.
4. Run the Database Update Script
Run the database update script by navigating to example.com/update.php in your browser. Follow the instructions presented to execute the necessary database update. If the update process executes without errors, you are ready to repeat this process for the next module.
Further information
For further information on maintenance and other issues related to Acquia Drupal, see Acquia's documentation index.