SugarCRM Silent Upgrade Tutorial

How to upgrade SugarCRM with the silent upgrader

One way to update SugarCRM is to use the silent upgrade feature that's included in the application. The upgrade is performed through SSH (Secure Shell). All HostKnox clients have free SSH access as part of the hosting plan. Windows users can connect to their accounts via SSH with an application called PuTTY. For more information on how to do it read the tutorial on how to connect to your account through SSH using PuTTY.

Make sure you have a recent backup copy of the SugarCRM files and of the database used by the application. For more information on how to back up everything check out the tutorial on how to back up your site.

Before you can start the update process you have to download the corresponding update package. For example, if your SugarCRM is one of the 6.3 versions you'll need the update package from version 6.3.x to version 6.4.0. You can download update packages from the official SugarCRM site. If you're not sure what version your SugarCRM is, log in to your account in the application and click on the About link in the top right corner.

After you download the archive to your local computer don't unzip it. You have to upload it as it is to your SugarCRM hosting account. It's not necessary for it to be in the root SugarCRM directory, but in this tutorial we'll use that directory as an example. Assuming that SugarCRM is installed in a folder called sugarcrm in the root public_html directory on the hosting account, we'll upload the upgrade archive in public_html/sugarcrm. You can upload the archive from the Files section of the Pixie control panel, you can use an FTP client, or you can do it through SSH.

After the update archive is uploaded and you're logged in to your hosting account via SSH, you need to execute an SSH command in order to perform the upgrade. This command will execute the file silentUpgrade.php that comes with every installation package and so it should already be on your account. With respect to the root SugarCRM directory the file is located in modules/UpgradeWizard/silentUpgrade.php. The command looks like this:

php -f (path to silentUpgrade.php file) (path to upgrade archive) (path to log file) (path to your SugarCRM installation) (your admin name)

You have to replace the paths with the actual ones and you have to provide the admin name that you use to log in to SugarCRM. The log file is created during the upgrade, so you don't necessarily have to provide the path to an existing file.

When you connect to your account through SSH you're in the folder /home/username (where username is replaced with your actual master username). This is your current working directory. If we use the above example of the location of your SugarCRM installation on your account, the full path to it would be /home/username/public_html/sugarcrm. We already assumed that the upgrade archive is uploaded in the root SugarCRM directory on the account. We'll name the log file upgrade.log, and we'll also assume that the admin name is just admin. With these examples taken into account, the actual command that we have to execute in our case would look like this:

php -f /home/username/public_html/sugarcrm/modules/UpgradeWizard/silentUpgrade.php /home/username/public_html/sugarcrm/ /home/username/public_html/sugarcrm/upgrade.log /home/username/public_html/sugarcrm admin

Once you type the command and you press the Enter button on your keyboard the upgrade process will start. It shouldn't last more than a couple of minutes. When it's complete you'll receive a confirmation message:

SSH-Confirmation Message

After that log in to your SugarCRM application. Click on the Admin link in the upper right corner to go to the admin panel. Then click on the Repair button that's in the section System, and on the page that opens click on Rebuild Relationships:

Admin Panel-Rebuild Relationships

After the upgrade the page layout of the application might be scrambled (without CSS). To fix this change the permissions of the cache folder (including subfolders) that's in the root SugarCRM directory to 755. One way to do it is with an FTP client. To learn how to do it read the tutorial on file and folder permissions.