Upgrade CiviCRM

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:

 $ test ! -f "installdir/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."

The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.

It is strongly recommended to create a backup before starting the update process. If you have important data, create and restore a backup to ensure that everything works properly.

You can upgrade the application only without modifying any other stack components by following these instructions.

To upgrade Drupal, follow these instructions. During the process, you may encounter errors when attempting to verify permissions and clear cached files, as Bitnami’s default file permissions are different from those assumed by the CiviCRM documentation.

To resolve this, unpack the new files and then use the following commands to verify file permissions and clear cached files instead of the ones shown in CiviCRM documentation. Execute the following commands depending on your installation type:

  • Approach A (Bitnami installations using system packages):

    $ sudo chown bitnami:daemon -R installdir/drupal/ $ sudo find installdir/drupal/ -type f -exec chmod 660 {} ; $ sudo find installdir/drupal/ -type d -exec chmod 770 {} ; $ sudo chmod 640 installdir/drupal/sites/default/settings.php $ sudo chmod 750 installdir/drupal/sites/default $ sudo chmod 750 installdir/drupal/sites $ sudo rm -rf installdir/drupal/sites/default/files/civicrm/templates_c/*

  • Approach B (Self-contained Bitnami installations):

    $ sudo chown bitnami:daemon -R installdir/apps/civicrm/htdocs $ sudo find installdir/apps/civicrm/htdocs -type f -exec chmod 660 {} ; $ sudo find installdir/apps/civicrm/htdocs -type d -exec chmod 770 {} ; $ sudo chmod 640 installdir/apps/civicrm/htdocs/sites/default/settings.php $ sudo chmod 750 installdir/apps/civicrm/htdocs/sites/default $ sudo chmod 750 installdir/apps/civicrm/htdocs/sites $ sudo rm -rf installdir/apps/civicrm/htdocs/sites/default/files/civicrm/templates_c/*

Once done, continue with the official documentation to upgrade the database and the application.

Last modification July 20, 2020