The SugarCRM Silent Upgrade Utility is a life saver. Here at Technology Advisors, we've banned the use of the Upgrade Wizard. With the Upgrade Wizard, there are numerous things that can go wrong. Among those things are the upload file size, permissions and timeout settings for the server. If the server is not setup correctly, the upgrade could fail to upload, fail to overwrite or create files during the upgrade or time out. Even when all these settings are correct, it still seems to fail once in a while.

With the Silent Upgrade Utility, you need SSH access to your server to run the commands locally on the server. This removes any issues with uploading, permissions or timeouts. First, upload the upgrade file you would normally upload to the Upgrade Wizard. You also need to upload the silent Upgrade Utility. This file will probably have "Pro" in the name, no matter your edition. It is often the same file for all editions. Unzip this file and create the command based on the documentation. I prefer to copy and paste the command into a document and fill it out off the server to make sure I get it correct:

php CliUpgrader.php -z /home/users//sugarupgrade/ -l ./silentUpgrade_7600.log -s /var/www/html/sugarcrm/ -u admin

Not all of the switches are necessary, see the documentation for more information. The reason I write the command in a separate document is so I can copy it later for the production upgrade. I also like to keep notes of any other steps or changes necessary on the server or Sugar instance. You are testing first, aren't you!?

The command line utility allows you to easily view the health check, log of the upgrade and re-start from a specific step, if necessary.

Two common mistakes I see is that you must run the command, "php CliUpgrader.php..." from the directory where you unzipped the utility and you must make sure you set ownership and permissions of the Sugar instance directory when finished. Good luck upgrading!

Posted in: