Upgrade SRM to the Latest Version Through cPanel

This page is intended for users who are currently using SRM version 9.0 or later. If you are using a version older than 9.0, do not follow the steps on this page. Instead, please contact our support team for assistance.

Step 1: Back Up Your Current SRM Installation Using cPanel

Before starting the upgrade, it’s essential to back up your SRM system. This ensures that you can restore your data if anything goes wrong during the upgrade.

1.1 Backing Up SRM Files via cPanel File Manager

  1. Log in to your cPanel account.
  2. Open the File Manager tool from your cPanel.
  3. Navigate to the folder where SRM is installed.
  4. Typically (though not necessarily), it should be located inside a directory such as: /home/your_cpanel_username/path_to_srm/srm.
  5. Right-click on the srm folder and choose Compress from the menu.
  6. In the compression options, select Zip Archive, and name the file (for example, srm_backup.zip).
  7. Click Compress File(s), and after compression completes, download the zip file to your local machine or move it to a secure location on your server.

1.2 Backing Up the SRM Database via cPanel phpMyAdmin

  1. Go back to the cPanel dashboard and click on phpMyAdmin.
  2. From the left sidebar, select the database used by your SRM system (the same database you selected during installation).
  3. Click the Export tab at the top.
  4. Choose the Quick export method and leave the format as SQL.
  5. Click Go to download the database backup file (e.g., backup.sql) to your local machine.

Once you have backed up both the SRM files and database, you are ready to begin the upgrade process.


Step 2: Rename the Existing “srm” Directory

Using cPanel File Manager, rename the current srm directory to srm_old, as shown in the image below.

Note: The image shows the renamed old version (srm_old), and the backup created in Step 1.


Step 3: Upload the New Version of SRM

Inside the new version of SRM (the one that matches your PHP version), you should find the following files and folders:

  • The srm directory – Contains the system files for the new version.
  • install.sh – A shell script that automates the installation of Smart Report Maker on Linux systems. This should only be used for fresh installations, not for updating an existing version.
  • install.ps1 – A PowerShell script that automates the installation of Smart Report Maker on Windows systems. This is also intended for fresh installations only.
  • update.sh – Used to update an existing installation of SRM on a Linux system.
  • update.ps1 – Used to update an existing installation of SRM on a Windows system.

Note: The image shows the contents of the downloaded new version. We only need the srm directory and the update.sh script.


Please, Upload the new “srm” directory from the version you downloaded, along with the update.sh script. Your directory structure should now look like the one shown in the image:

  • srm_old – the renamed folder of your old SRM version
  • srm – the new version’s folder you just uploaded
  • update.sh – the script used to complete the upgrade process

Note: The image shows the renamed old version (srm_old), the newly uploaded version (srm), and the update script (update.sh) placed in the same directory.


Step 4: Set Proper Permissions

4.1 Using the File Manager in your cPanel, make sure that the update.sh script has 755 permissions, as shown in the image below.

4.2 Also, make sure the newly uploaded srm directory is set to 755 permissions to ensure proper functionality.


Step 5: Execute the Upgrade Script

Step 5.1: Open the Terminal

To execute the update script, “update.sh,” you’ll need to enter commands on your remote server. You can do this using the Terminal available in cPanel under the Advanced section. However, if your hosting provider has disabled the online terminal, you will need to establish an SSH connection from your local computer. For guidance on setting up an SSH connection via cPanel, please refer to this post.

Locating the terminal in cPanel under the Advanced section

Step 5.2: Navigate to the SRM Directory

Once the terminal is open (either through cPanel or SSH), you might need to verify your current location by running the following command:

pwd

Navigate to the directory that contains the srm folder. You can do this by running:

cd /path_to_srm 

Replace /path_to_srm with the actual path where “srm” directory is located.

Step 5.3: Verify the Presence of the Update Script

Verify that the update.sh script, along with the srm and srm_old directories, are present in the current directory by running the following command:

ls -ahl

Note: You should see update.sh listed in the output as well as the “srm” directory.

Step 5.4: Run the Update Script

To start the upgrade process, run:

bash update.sh

if you encounter an issue due to permissions you can try the following command instead:

sudo chmod +x update.sh && bash update.sh

As an alternative, you can run this command:

sudo chmod +x update.sh && ./update.sh

Step 6: Validate the Updated Version

Log in to your SRM system using the same URL and your existing credentials.
You should see all your data exactly as it was, now enhanced with the new features included in the latest version.

To confirm the version number, click the About icon located in the top-right toolbar.


Step 7: Clean Up After a Successful Upgrade

Once you’ve confirmed that the upgrade was successful:

  • You may safely delete the following items:
    • srm_old (the renamed old version)
    • existed_resources (temporary update files)
    • update.sh (The updating script)

These files and folders should be located at the same directory level as the srm folder.

⚠️ Important: Do not delete the backup you created in Step 1. Keep it stored securely in case you need to restore your system in the future.

If the Upgrade Was Not Successful

If something went wrong during the upgrade:

  • Check the update.log file for detailed error messages.
  • Review the .progress file to see how far the process went.
  • You may choose to retry the upgrade or roll back to the previous version using the srm_old folder and your database backup.

Summary

  • You can upgrade SRM version 9.0 or later to the latest version.
  • Versions earlier than 9.0 are not supported by this guide.
  • This post explains how to update an SRM version on your cPanel using the following steps:
    • Back up the existing version – It’s important to keep the backup even after the upgrade. This can be done using the File Manager and phpMyAdmin in your cPanel.
    • Rename the existing version – This helps prevent conflicts during the upgrade process.
    • Upload the new version and set the required permissions – Use the File Manager to upload the files and assign proper permissions.
    • Execute the update script – Run the script that automates the update process.
    • Validate and finalize the update – Make sure everything is working correctly and complete any final steps.