Upgrading MintHCM to a Newer Version

To begin, you have to manually copy files from the newer source to your existing installation.

First, go to https://minthcm.org/download/ and download the latest version.

Upgrade Process

Copy the files

Copy the following directories from the new version to your existing instance:

  • `legacy/custom` → `legacy/custom`
  • `legacy/data` → `legacy/data`
  • `legacy/jssource` → `legacy/jssource`
  • `legacy/metadata` → `legacy/metadata`
  • `legacy/themes` → `legacy/themes`
  • `legacy/modules` → `legacy/modules`
  • `legacy/Api` → `legacy/Api`
  • `legacy/vendor` → `legacy/vendor`
  • `legacy/lib` → `legacy/lib`
  • `vue/dist` → root directory
  • `api` → `api` (excluding the `config` directory)

Set File Permissions

After copying, ensure proper file permissions are set.

Example Bash Script

#!/bin/bash

tmp_dir= <path_to_your_source_mint_files>

instance_dir= <path_to_your_destination_mint_instance>

cp -r ${tmp_dir}/legacy/custom/ ${instance_dir}/legacy/custom/

cp -r ${tmp_dir}/legacy/data/* ${instance_dir}/legacy/data/

cp -r ${tmp_dir}/legacy/include/* ${instance_dir}/legacy/include/

cp -r ${tmp_dir}/legacy/jssource/* ${instance_dir}/legacy/jssource/

cp -r ${tmp_dir}/legacy/metadata/* ${instance_dir}/legacy/metadata/

cp -r ${tmp_dir}/legacy/themes/* ${instance_dir}/legacy/themes/

cp -r ${tmp_dir}/legacy/modules/* ${instance_dir}/legacy/modules/

cp -r ${tmp_dir}/legacy/Api/* ${instance_dir}/legacy/Api/

cp -r ${tmp_dir}/legacy/vendor/* ${instance_dir}/legacy/vendor/

cp -r ${tmp_dir}/legacy/lib/* ${instance_dir}/legacy/lib/

cp -r ${tmp_dir}/vue/dist/* ${instance_dir}/

rsync -ra ${tmp_dir}/api/ ${instance_dir}/api/ –exclude configs

cp ${tmp_dir}/legacy/minthcm_version.php ${instance_dir}/legacy/minthcm_version.php

chown -R www-data:www-data ${instance_dir}

Rebuild Your Instance

  1. Log in to your instance as an administrator.
  2. Go to Administration page.
  3. Click on “Repair” under Admin Tools
  4. Run the following sequence:
    • “Quick Repair and Rebuild”
    • “Rebuild Minified JS Files”
    • “Rebuild View Tools”

Note: If “Quick Repair and Rebuild” returns SQL code to update your database schema, you must execute this SQL manually.

Troubleshooting

If you cannot log in to MintHCM after the upgrade:

  1. Check the legacy/minthcm.log file.
  2. The system may be having issues retrieving your user data from the database, possibly due to a missing column.
  3. If a column is missing, you will need to add it to the schema manually.