nativeInstallerorangehrm

Upgrade OrangeHRM

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: The Approach A sections referred to below do not apply to Bitnami native installers. Users of Bitnami native installers should refer only to the Approach B sections.

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

You can upgrade the application only without modifying any other stack components. Follow these steps:

  • Back up your current OrangeHRM database.

      $ cd installdir/mysql
      $ bin/mysql -u root -p
    
  • Create a new database and assign permissions to the user of the orangehrm database.

      mysql> CREATE DATABASE bitnami_orangehrm_backup;
      mysql> GRANT ALL PRIVILEGES ON bitnami_orangehrm_backup.* TO 'bn_orangehrm'@'localhost' IDENTIFIED BY 'PASSWORD';
      mysql> exit;
    
  • Create OrangeHRM tables in the new database:

      $ bin/mysqldump -u root -p bitnami_orangehrm > /home/bitnami/ohrm_backup.sql
      $ bin/mysql -u root -p -o bitnami_orangehrm_backup < /home/bitnami/ohrm_backup.sql
    

The next steps will depend on your installation type.

Approach A: Bitnami installations using system packages

  • Remove the actual content of the installdir/orangehrm directory and uncompress the new version of OrangeHRM to the same location.

      $ cd installdir
      $ sudo rm -rf orangehrm/
      $ sudo unzip orangehrm-version.zip
      $ mv orangehrm-version/ orangehrm/
    
  • Change the ownership of the files and their permissions:

      $ chown -R bitnami:daemon installdir/orangehrm/
      $ chmod -R 775 upgrader/ lib/ symfony/
    

Approach B: Self-contained Bitnami installations

  • Remove the actual content of the installdir/apps/orangehrm/htdocs directory and uncompress the new version of OrangeHRM to the same location.

      $ cd installdir/apps/orangehrm
      $ sudo rm -rf htdocs/
      $ sudo unzip orangehrm-version.zip
      $ mv orangehrm-version/ htdocs/
    
  • Change the ownership of the files and their permissions:

      $ chown -R bitnami:daemon installdir/apps/orangehrm/htdocs/
      $ chmod -R 775 upgrader/ lib/ symfony/
    
  • Launch the upgrade wizard. Access it in the web browser by navigating to http://localhost/upgrader/web/index.php:

    OrangeHRM upgrade

  • Complete the fields as is shown in the image. The password is the same that you put in the “GRANT ALL PRIVILEGES” command. Follow the remaining instructions.

  • Clean up and remove the old database and the backup file:

      $ installdir/mysql/bin/mysql -u root -p
      mysql> DROP DATABASE bitnami_orangehrm_backup;
      mysql> exit;
      $ rm /home/bitnami/ohrm_backup.sql
    
Last modification June 16, 2021