Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Tip
titleDatabase Collation

Often times WHMCS has mixed database collations and this can cause issues during import. For this reason we recommend:

  • Cloning your WHMCS database, and updating the collation for all tables to utf8mb4_unicode_ci.
  • Make sure Blesta is also utf8mb4 by going to Tools > Utilities. Updating Blesta from utf8 to utf8mb4 can be accomplished by clicking the "Update to utf8mb4" button. If the Description says "Database already supports utf8mb4" then the collation has already been updated.
  • Import from your cloned utf8mb4_unicode_ci WHMCS database.


Tip
titleTicket Numbers

Blesta uses an int(10) column for ticket codes. If you have any non-numeric characters in your ticket system in WHMCS, you can update them to match the internal ID to prevent any errors during import. Do this to a cloned copy of your WHMCS database, not your production copy.

Code Block
languagesql
UPDATE tbltickets SET tid = id;



Info

If you prefer, you can create a copy of your WHMCS database and import from that instead of your live system.

...

  1. Make sure you have completed the Initial Steps for Migrating to Blesta.
  2. Stop the cron job running for your WHMCS installation.
  3. Put WHMCS into maintenance mode to prevent client logins by visiting [Setup] > [General Settings] > [General].
  4. Back up your WHMCS files. You can do this via an FTP program, or via a shell by running: zip -r backup.zip /path/to/installation/*
  5. Back up your WHMCS database. You can do this through a database manager like PHPMyAdmin using the "Export" feature, or with the mysqldump shell command by running: mysqldump -u database_username -p database_name -r backup.sql and entering your database password when prompted.

Performing the Importthe Import 

Importing via CLI

Importing via CLI is recommended especially if there is a significant amount of data. Navigate to your Blesta installation directory and run the following command, replacing the variables.

  • DBHOST with your database hostname
  • DBNAME with your database name
  • DBUSER with your database user
  • DBPASS with your database pass
  • CCENCRYPTIONHASH with your CC Encryption Hash
  • If you don't want to balance credits (recommended), change to 'n'.
  • If you don't want to enable debug, change to 'n'

Use the -h switch to show all options: php index.php admin/plugin/import_manager/admin_manage_plugin/index -h

Code Block
php index.php admin/plugin/import_manager/admin_manage_plugin/index --type whmcs --version 8.0 --host DBHOST --database DBNAME --user DBUSER --pass DBPASS --key CCENCRYPTIONHASH --balance_credit y --enable_debug y

Importing via Web

  1. Visit [Settings] > [Company] > [Plugins] > Installed and click "Manage" for the Import Manager.
  2. Click the "5.2" link next to the platform WHMCS.
  3. Fill out all of the requested fields
    1. Database Host: Enter your WHMCS database server name. If MySQL is running on the same server, use localhost
    2. Database Name: Enter the name of your WHMCS database.
    3. Database User: Enter the user name for your WHMCS database.
    4. Database Password: Enter the password associated with your WHMCS database user.
    5. CC Encryption Hash: Enter the CC Encryption Hash as found in your WHMCS configuration.php. This is required in order to decrypt encrypted data stored in your WHMCS installation.
  4. Double check that the data is all correct, and click the "Continue" button.
  5. You will be prompted to allow the importer to import your packages into Blesta, or match them up. It's recommended that you go with the default setting and import the packages, however, advanced users may wish to create their packages in Blesta first and match them up.
  6. Submit the form to start the import.

...