Updating Drupal Installations

From wiki.occupyboston.org
Jump to: navigation, search

I'll use voices.occupyboston.org as an example.

Note: this procedure works for minor upgrades to modules and themes. You'll need to do more work for major revision upgrades to drupal core.

Remote Prep

Prep: make sure that all of the live files are under version control.

 ssh obvoices@attucks.mayfirst.org
 cd voices.occupyboston.org/web
 git status

If there are outstanding changes, either commit them, or add to .gitignore. When you're done

 git push hub

Local Prep

In your local environment,

 git pull REMOTE master

where REMOTE is whatever you called the remote repository. (use git remote -v if you're not sure).

drush update

On your local machine, cd to drupal's root directory (the one with index.php).

 drush pm-update

Read the output. Update modules as needed.

When drush has finished, use "git add" and "git rm" to build the changeset for your commit. Then git commit.

After doing so, git status should say "nothing to commit (working directory clean)". If not, continue committing files until it is clean.

deploy changes

Next, send your changes up to the server

 git push REMOTE master

As before, REMOTE is your name for the remote repository.

Finally make sure the live database is up to date

 ssh obvoices@attucks.mayfirst.org
 cd voices.occupyboston.org/web
 drush updatedb