How to upgrade WHMCS?

timthumb

Recently I came to a problem of how to upgrade Webhost Manager Complete Solution (The solution which manages your accounts on WHM and invoices your clients), very useful app but there are many features in this script which I don’t need, however, it integrates with WHM without any difficult work. Ok, let’s return to upgrade problem, we have 2 solutions :

1. Order upgrade service from WHMCS for 24 USD. http://www.whmcs.com/services/upgrade-service/

2.  Manual upgrade. All we need is to :

1. Download latest stable version from client area.

  1. Begin by logging in to the client area @ http://www.whmcs.com/members/clientarea.php or obtain the latest version from your web host if you received your key from them
  2. Navigate to Services > Licenses & Services
  3. Select one of your active license keys and click View Details
  4. Now select the Downloads tab
  5. The latest new release will be displayed last on the list of downloads, along with the data of release for verification

2. Backup all your data. Login via ssh to your host.

Example :  ssh -p 22 -l root yourhost.com (where -p is port number of SSH service, to define your port, please, ask your hosting provider or open /etc/ssh/sshd_config file and look for line port, -l root your administrator account, yourhost.com is your hostname, you can change it to your host’s IP address). Then you’ll need to enter password.

Or if you have cpanel, you can backup your whmcs folder via File Manager.

Open the folder where the whmcs located. Let’s suppose it located in public_html/whmcs folder. Put down this command : cp -r public_html/whmcs whmcs_backup (where -r option for recursively copying all files to whmcs_backup folder)

Then we need to backup mysql data. Please, login mysql using your root (admin account). Example: mysql -uroot -p123 (where, root is admin account, 123 is password for it). You’ll see welcome message. Then, please, type – show databases; and then press enter to execute the code. You’ll see the list of databases. Probably the name of db will contain the word “whmcs”. If you couldn’t find the name of db, you could open the file configuration.php :

$license = “WebHost-xxxx”;
$db_host = “localhost”;
$db_username = “root”;
$db_password = “dbpass”;
$db_name = “whmcs_db”;
$cc_encryption_hash = “djskdjksdjksjdksjdks”;
$templates_compiledir = “/home/whmcs/templates_c/”;
$attachments_dir = “/home/whmcs/attachments/”;
$downloads_dir = “/home/whmcs/downloads/”;

The $db_name is the what you need. Okay, now we can backup our database. Please, type in ssh session (terminal or Putty, whatever). mysqldump -uroot -pyourmysqlpass db_name > db_backup_file.sql
The file db_backup_file.sql will created in current directory. Okay, we made backup and we can move forward.

3. Upload the new files to your existing installation folder replacing any existing folders & files

You can upload data via :
– FTP (file transfer protocol)
– FileManager via cPanel or other web filemanager

After you’ve uploaded the whmcs archive, you can unzip it typing this command – unzip /home/whmcs/archive.zip -d ./ (it will unzip archive to current directory)
Or you can unzip it on your computer and upload unzipped files directly to the whmcs folder.

4. Installation

  1. Visit the admin area as you normally would to login and you should then be automatically redirected to the upgrade script. If this is not shown automatically, please manually visit /install/install.php to invoke the upgrade process.
  2. Accept the license agreement
  3. If you are prompted for any database information *STOP*, this indicates the configuration.php file is missing and so a new install is being attempted – you need to restore the configuration.php before continuing
  4. Tick to confirm you have backed up your database and click the upgrade button to complete
  5. Once the updates finish, delete the install folder from your server
  6. Now proceed to update your custom templates with any new or changed files in the version you’ve upgraded to. These are listed in the Template Changes section of our Release Notes (see below).
  7. Finally clear your browser cache or perform a hard refresh (Ctrl + F5) and delete the contents of the template cache directory (usually called templates_c) to ensure you see the new templates.

Hope, it will help you. If you have any questions please write here.

Leave a Reply

Your email address will not be published. Required fields are marked *