Updating Drupal

When updating a module,

  1. login to the website as root
  2. go to https://www.cis.ksu.edu/admin/reports/updates

  3. download the latest update
  4. in a terminal, go to a local copy of the repository
  5. go to ./branches/live/htdocs/sites/all/modules
  6. run the following:
    1. svn rm modulename

  7. then run:
    1. svn commit -m "updating modulename to v.Z"

  8. then copy from the directory in the archive:
    1. cp -R modulename /path/to/repository/branches/live/htdocs/sites/all/modules/

  9. now go back to the repository branches/live/htdocs directory and add the files to the repository:
    1. svn add modulename

  10. and commit everything:
    1. svn commit -m "updating modulename to v.Z"

  11. just to check everything went smoothly, go the the root directory of the repository and run:
    1. svn update
    2. svn log | less
  12. and check the log.
  13. now ssh into avenger:
    1. ssh avenger
    2. cd /web/cis-dept
    3. sudo svn update
    4. svn log | less
  14. and check the log.
  15. now go to https://www.cis.ksu.edu/update.php

  16. press continue
  17. then press update
  18. done

When updating the Drupal core,

  1. login to the website as root
  2. go to https://www.cis.ksu.edu/admin/reports/updates

  3. download the latest update
  4. in a terminal, go to a local copy of the repository
  5. go to ./branches/live/htdocs/
  6. check for differences between themes/bluemarine in the repository and the new archive. If necessary, make changes to sites/all/themes/cis.
  7. run the following:
    1. svn rm *.txt
    2. svn rm *.php
    3. svn rm .htaccess
    4. svn rm includes
    5. svn rm misc
    6. svn rm modules
    7. svn rm profiles
    8. svn rm scripts
    9. svn rm themes
    10. svn rm sites/all/README.txt
  8. check for differences between sites/default/default.settings.php in the repository and the new archive. If necessary, make changes to the sites/default/settings.php file.
  9. then run:
    1. svn rm sites/default/default.settings.php
    2. svn commit -m "updating to drupal x.y"
  10. then copy from the directory in the archive:
    1. cp *.txt /path/to/repository/branches/live/htdocs/
    2. cp *.php /path/to/repository/branches/live/htdocs/
    3. cp .htaccess /path/to/repository/branches/live/htdocs/
    4. cp -R includes /path/to/repository/branches/live/htdocs/
    5. cp -R misc /path/to/repository/branches/live/htdocs/
    6. cp -R modules /path/to/repository/branches/live/htdocs/
    7. cp -R profiles /path/to/repository/branches/live/htdocs/
    8. cp -R scripts /path/to/repository/branches/live/htdocs/
    9. cp -R themes /path/to/repository/branches/live/htdocs/
    10. cp sites/all/README.txt /path/to/repository/branches/live/htdocs/sites/all/
    11. cp sites/default/default.settings.php /path/to/repository/branches/live/htdocs/sites/default/
  11. open the .htaccess file and do the following:
    1. after the the block
      •                 # Various rewrite rules.
                        <IfModule mod_rewrite.c>
                          RewriteEngine on
    2. add
      •                 # Pass external site stuff without being rewritten 
                        RewriteRule ^/_external/? - [L] 
    3. and uncomment the lines
      •                 # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
                        # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] 
    4. and edit to
      •                 RewriteCond %{HTTP_HOST} ^cis\.ksu\.edu$ [NC]
                        RewriteRule ^(.*)$ http://www.cis.ksu.edu/$1 [L,R=301] 
  12. now go back to the repository branches/live/htdocs directory and add the files to the repository:
    1. svn add *.txt
    2. svn add *.php
    3. svn add .htaccess
    4. svn add includes
    5. svn add misc
    6. svn add modules
    7. svn add profiles
    8. svn add scripts
    9. svn add themes
    10. svn add sites/all/README.txt
    11. svn add sites/default/default.settings.php
  13. and commit everything:
    1. svn commit -m "updating to drupal x.y"
  14. just to check everything went smoothly, go the the root directory of the repository and run:
    1. svn update
    2. svn log | less
  15. and check the log.
  16. now ssh into avenger:
    1. ssh avenger
    2. cd /web/cis-dept
    3. sudo svn update
    4. svn log | less
  17. and check the log.
  18. now go to https://www.cis.ksu.edu/update.php

  19. press continue
  20. then press update
  21. done