How to Manually Migrate WHMCS on cPanel Print

  • 0

Migrating your WHMCS installation to a new hosting account or server can seem complex, but doing it manually via cPanel gives you full control and ensures your data is transferred safely. This guide will walk you step by step.

⚠️ Important: Always back up your files and database before starting a migration.

Step 1: Backup WHMCS Files

  1. Log in to the cPanel account of your current host.

  2. Open File Manager and navigate to the directory where WHMCS is installed.

  3. Select all WHMCS files and folders (including configuration.php).

  4. Click Compress and choose ZIP Archive.

  5. Download the ZIP file to your local computer.

This ensures all WHMCS core files, templates, attachments, and uploads are preserved.

Step 2: Export the WHMCS Database

  1. In cPanel, open phpMyAdmin.

  2. Select your WHMCS database.

  3. Click the Export tab.

  4. Choose the Quick export method and SQL format.

  5. Click Go and save the database SQL file to your computer.

For large databases, consider compressing the SQL file to ZIP before downloading.

Step 3: Upload WHMCS Files to the New Host

  1. Log in to cPanel of the new HostWatt account.

  2. Open File Manager and navigate to the folder where you want WHMCS installed (e.g., public_html/whmcs).

  3. Click Upload, select your WHMCS ZIP file, and upload it.

  4. Once uploaded, select the ZIP file and click Extract.

Make sure all files are extracted and the folder structure matches your previous installation.

Step 4: Create a New Database on the New Host

  1. In the new cPanel, go to MySQL Databases.

  2. Create a new database (e.g., whmcsdb).

  3. Create a new database user and assign it to the database with All Privileges.

  4. Note down the database name, username, and password — you’ll need these for configuration.

Step 5: Import the WHMCS Database

  1. Open phpMyAdmin in the new cPanel account.

  2. Select the newly created database.

  3. Click the Import tab.

  4. Choose the SQL file you exported earlier (or the compressed ZIP).

  5. Click Go to start the import.

The database import may take a few minutes depending on size. Check that all tables are imported successfully.

Step 6: Update configuration.php

  1. In File Manager, locate configuration.php inside your WHMCS installation folder.

  2. Edit the file to reflect the new database credentials:

$mysql_host = "localhost";        // Usually localhost
$mysql_username = "new_db_user";  
$mysql_password = "new_db_pass";  
$mysql_database = "new_db_name";  
$mysql_port = "3306";             // Optional, default is 3306
  1. Save the changes.

If your WHMCS URL is changing, also update the $whmcs->systemURL value if needed.

Step 7: Adjust Permissions

  1. Ensure the attachments/, downloads/, templates_c/, and crons/ directories are writable (chmod 755 or 775).

  2. Check that configuration.php is not publicly writable (chmod 644).

Step 8: Test Your Installation

  1. Open the WHMCS URL in your browser (e.g., https://yourdomain.com/whmcs/admin).

  2. Log in with your existing admin credentials.

  3. Check that:

    • All client data is intact

    • Products, services, and invoices are visible

    • Emails and cron jobs are functioning

Step 9: Update Cron Jobs

WHMCS requires cron jobs for automation:

  1. In cPanel, go to Cron Jobs.

  2. Set up cron jobs as per WHMCS recommended cron settings.

  3. Use the new paths if the installation directory has changed.

Step 10: Clean Up

  • Delete any temporary backup files in the new cPanel folder after confirming everything works.

  • Keep your old host backup until you verify the new installation is fully functional.

✅ Tips for a Smooth Migration

  • Always test in a staging subdomain before going live.

  • Use ZIP compression for large files to avoid upload limits.

  • Verify PHP version compatibility on the new host (HostWatt supports the latest PHP versions).

  • Update payment gateways, email templates, and SSL settings if your domain or server changes.

Need Assistance?

If you encounter any issues during migration, HostWatt support is available 24/7. Open a ticket or start a live chat, and our team will help you migrate your WHMCS installation safely.


Was this answer helpful?

« Back