Updating WHMCS on the Command Line
When a new version of WHMCS is available, in-product notices will appear. We recommend using the Automatic Updater utility to apply updates, but you can also apply updates manually using the command line. This is useful if you are provisioning WHMCS for multiple installations.
Advanced Users Only
We only recommend this method if you are already familiar with WHMCS, SSH, and command line tools.
Prepare to Update
To update WHMCS manually, perform the steps below:
- Review the latest system requirements and release notes to ensure that your environment meets the requirements of the new version.
- Back up your WHMCS files and MySQL® database using our built-in manual database backup or your preferred backup tools.
- Do not skip this step.
- Make certain that you include both the WHMCS files and database.
- If you buy your license directly from WHMCS, download the latest full release from our release download page. Otherwise, get this from your license provider.
- Upload the distribution's
.zipfile to the server.
- Extract the files to a non-public location (for example,
- If you have customized the
admindirectory, rename the
/whmcs/admindirectory in the new files (if it is present) to match it.
To perform the update:
1. Move the staged files to the existing installation folder, replacing any existing folders and files, using the following command, where
/home/path/to/whmcs is the path to your WHMCS installation:
mv /home/update-staging/whmcs/* /home/path/to/whmcs
2. Execute the update script using the following command, where
path/to/whmcs/install is the path to your WHMCS installation:
php -f path/to/whmcs/install/bin/installer.php -- -u
For more information about the installation script, see Installing on the Command Line.
3. Follow the onscreen instructions to begin the update process. When the process finishes, a Program Completed success message will appear.
4. Delete the
install directory from your server.
rm -r /home/path/to/whmcs/install
5. If you have customized the location of thecronsdirectory, make certain that you move that directory's contents in your distribution to the custom location.
6. If you have customized the permissions on any files (for example,
/crons/pipe.php), reapply those changes.