How To Migrate WHMCS From One Server To Another

WHMCS is by far the most popular web hosting client management and billing system out, with mature solutions to make web hosting business automated.

As a web hosting provider, you might ever meet one issue – migrate WHMCS from one server to another.

Migrating WHMCS is not that difficult if you understand MySQL, PHP and obviously are aware of where the actual files and folders are located for the original install. However, if you are not, you might need to refer to the following steps in this tutorial or hire a server management company to do the migration task for you.

Preparation: set up the new server

Prior to the migration of WHMCS, you should have your new server ready.

Several things you need to check on new server:

  1. Your new server should have a public IP address;
  2. PHP version is higher than 5.6.0 (Latest 7.1 or 7.2 Release recommended) and MySQL version is higher than 5.2.0;
  3. PHP has the following extensions: Curl with SSL. GD2 Image Library, JSON Support, XML (IMAP, MBString and Iconv recommended);
  4. Ioncube Loaders version is 10.1.0 or later.

While these are the minimum requirements, we strongly recommend using the latest available, stable releases of all software and extensions.

Also, make sure you have created the domain and database for your WHMCS, and make sure the database name, database user name and password are accurate.

Make a good backup

It’s always a good habit before we do something in the production environment. In your case, you need to make a full backup of the WHMCS site and database.

We suggest you download the backup site files via FTP and export the database from PHPMyAdmin. If you use a control panel like cPanel, DirectAdmin, etc, there will be an option to download the backup from the control panel.

Double check the backup size because some network glitch might happen when you export and download the backup, which will result in a total useless backup.

Turn on maintenance mode in WHMCS

Now that the WHMCS is backed up, we can temporarily turn on the maintenance mode in WHMCS so that the backup you make will be the latest.

To enable maintenance mode, simply go to WHMCS admin dashboard and go to:

Setup -> General Settings -> Maintenance Mode

Tick the option to prevent client area access during migration.

It’s suggested to tell your customers you are doing maintenance, you can determine the maintenance content in ‘Maintenance Mode Message’ text area.

Copy the backup files and database to the new server

After confirming the new server has met the requirements to run WHMCS, you can copy the backup file you make in Step 2 to the new server.

Similar to the database export action in Step 2, you need to import the database backup to the new server, make sure you are using the same charset with your origin install, otherwise you will run into issue.

Open confiugration.php in your WHMCS root directory, change the database credentials to what you have just set and save it.

Reissue the WHMCS license

WHMCS validates the license details every time, it will detect and recognize that you have changed the install location, so you need to reissue the WHMCS license.

If you purchased the Owned License from WHMCS official, you can simply go to WHMCS client area to reissue it;

If you get your WHMCS license from your web hosting provider, it could be a Web Host License, you will probably not be able to reissue it. However, if your new web hosting provider provides one, you need to replace the old license with it in configuration.php.

Verify if it works perfectly with the new server

Looks like we are almost there.

Now we need to verify if the WHMCS works perfectly with the new server. Rather than updating DNS record to the new server IP, we recommend you to verify it locally first so that if there’s an issue, you can resolve it first at local without revealing it to your customers.

The way we suggest to verify it in local is to edit hosts.





Open the hosts file using your preferred text editor as administrator, and add a line with the following format:

# New server IP.        # WHMCS domain

Save it and then open your browser to access your WHMCS domain, log in with the same credentials you use on origin install, and verify if everything works well.

Cron Job

Cron job is the magic to make WHMCS automated. Even if we have moved the site files and database, the WHMCS will not work properly without a cron job.

If you are using a control panel like cPanel, cron job is built in, you can simply create the cron job task by following it in WHMCs:

Setup -> Automation Settings -> Cron Command

DNS record

Now it’s time to switch DNS record to your new server IP address.

Keep in mind it takes up to 48 hours to make DNS record change propagate globally. Please make sure it’s fully taking effect before you step into the last step.

Delete origin install

Don’t forget to delete your origin install after you are sure that everything is cool with your new WHMCS. There is no need having that in the wild.


Migrating WHMCS isn’t a difficult task, but it requires several steps and it’s tricky. Briefly, copying site files and database to the new server, reissue WHMCS license and verify, set cron jon and change DNS record, and then remove origin install.

If you are stuck within the process of migrating WHMCS, or you prefer to hire a reliable server management company to migrate WHMCS for you, HeySupport would be your ideal choice!