How to upgrade WHMCS?


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.

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 @ 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 (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, 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/ -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.

X-AntiAbuse, your e-mail is not safe for others

You’re sending e-mail, but receive the Mailer-Daemon error message that you’re spammer. Some mail-servers don’t trust emails, which have different primary hostname and original domain in headers. For example you have WHM based on, and cPanel account on

Please, edit /usr/local/cpanel/etc/exim/perl/mail_permissions under root account. Change the line $primary_hostname ||= Exim:expand_string(‘$primary_hostname’);  to $primary_hostname = Exim::expand_string(‘$original_domain’);


Экономика США не оправдывает свои средства

Вы думали о том что почему гос. долг США повышается ? Гос. долг может повышаться в том случае когда расходы превышают доходы. Т.е. каждый доллар вложенный в американскую модель бизнеса приносит чуть меньше доллара, на самом деле.  США каждый день выпускает гос. облигации со ставкой 3 процента годовых, его может купить любой желающий.  Вложив 1 доллар вы получите к концу года 3 цента дивидендов и продав облигацию в итоге получите 1 доллар 3 цента. На самом деле США не может заплатить эти 3 цента, так и не может вернуть вам этот 1 доллар. Для того чтобы вернуть ваши деньги они берут еще в долг. Модель бизнеса ничем не отличается от “МММ”, нет разве ?

Динамика роста гос. долга США

Screen utility


If you want to run long run processes via SSH, you need screen utility. Screen comes really handy when you are working on a console or sending long processes on a remote host and you can’t change the keep alive parameter on the client and server, don’t want to depend on from the server and client settings.

Solution :
Please, type in console this command -> screen <command>, for example : screen php /var/somescript.php and this script will run until it finishes, if even your client pc will burn.

To install this utility please type -> apt-get install screen [via root]

That’s all.

Couldn’t send mail() via php on Debian, Exim mailserver

I came to this problem, after testing mail function and exim, everything worked perfectly without error, but I didn’t receive e-mail. Then I tried to test exim, type exim -bt [email protected], if you receive the message – “Sendmail/Exim error “Mailing to remote domains not supported”, you need to reconfigure Exim to send the e-mail to remote domains.

Please, type – dpkg-reconfigure exim4-config,  under root account select – “internet site; mail is sent and received directly using SMTP”  and that’s all.

US – International PC keyboard, letter with acute diacritic, Mac OS X


This problem drove me crazy for some long time and I thought that this is IDE problem, but at last found the right solution. In Mac, when you type after letter for example – “a”, the quote, no matter single or double it changes to á, a’ => á

When you type code, $a = ‘a’; it transforms to $a = á, and then you try to write quote after typing the string and so on, it’s so boring, believe me, if you came here 🙂


How to turn off. Go to System Preferences » Language & Text » Input Sources, check US keyboard and then uncheck International (you cannot uncheck US International, if other US keyboard not checked) and that’s all.