Migrate cPanel Services

Use the steps in this guide after you have already migrated the required client hosting accounts from the old cPanel & WHM server to the new cPanel & WHM server.

After you move client hosting accounts from an old cPanel & WHM server to a new one, you must perform several tasks in your WHMCS installation to complete the migration. To do this, you can choose between several methods:

  • Add the new server to WHMCS and then manually change the server for each client service individually.
  • Add the new server to WHMCS and then change the server for all client services using a MySQL® query.
  • Replace the old server’s details in the server configuration with the new server’s details.
After you complete the migration, we recommend verifying that your data transferred successfully. For more information, see Verifying Successful Migration below.

Add the New Server and Change Services Individually

You can choose to add the new server to WHMCS and then manually change the server for each client service individually. Use this method if you are only migrating a small number of services or if you are moving gradually, on a service-by-service basis.

To do this:

  1. Go to Configuration () > System Settings > Servers.
  2. Add your new cPanel & WHM server to WHMCS normally.
    For steps, see Create a cPanel Server.
  3. For each service that had an associated account on the old cPanel & WHM server:
    1. Go to the service in the Products/Services tab in the client’s profile.
      Editing a cPanel product in the Products/Services tab
    2. For Server, select the new cPanel & WHM server.
    3. Click Save Changes.

Add the New Server and Change Services Using MySQL

You can choose to add the new server to WHMCS and then change the server for all client services using a MySQL query. Use this method if you are migrating a larger number of services.

This is an advanced method. Ask your database administrator or system administrator to perform this task. Always perform a complete file and database backup before performing bulk actions.

To do this:

  1. Go to Configuration () > System Settings > Servers.

  2. Add your new cPanel & WHM server to WHMCS normally.

    For steps, see Create a cPanel Server.

  3. Find the ID numbers for the old and new servers in your WHMCS installation. To do this:

    1. Go to Configuration () > System Settings > Servers.

    2. View each server’s information. The ID will appear in the URL in your browser, as in the example below:

      https://example.com/whmcs/admin/configservers.php?action=manage&id=1

      In this example, the server ID is 1.

  4. Run the following MySQL query against your WHMCS database, where NEW_SERVER_ID is the new server’s ID and OLD_SERVER_ID is the old server’s ID:

    UPDATE tblhosting SET server = 'NEW_SERVER_ID' WHERE server = 'OLD_SERVER_ID';

Replace the Old Server’s Details

If you do not want to add the new server as a separate server and retain the old server, you can replace the old server’s details in the server configuration with the new server’s details. If you use this method, you do not need to update the associated services because the server ID did not change in WHMCS.

Make certain that you have moved each account from the old server to the new server before updating the server information in WHMCS. If you do not do this first, you will experience serious problems.

To do this:

  1. Go to Configuration () > System Settings > Servers.
  2. Edit the server.
  3. Replace the old cPanel & WHM server’s hostname with the new cPanel & WHM server’s hostname.
  4. Enter the new cPanel & WHM server IP address.
  5. If they differ, update the nameservers.
  6. Enter the new username and password for WHM.
  7. Enter the API Token value for the new server.
  8. Click Save Changes.

Verifying Successful Migration

After you migrate your data, we recommend performing the following steps to check whether data migrated successfully:

  1. Go to Configuration () > System Settings > Servers.
  2. Click Sync Accounts for the server.
    • WHMCS will make an API call to the remote web server to fetch an up-to-date list of account records.
    • This may take a few seconds.
  3. Examine the analysis summary report that displays and note any discrepancies or issues.
    Do not click Continue if an account is missing. Instead, review the cPanel migration logs and make sure that it appears on the new server.

Last modified: October 29, 2024