WHMCS

Move WHMCS to a new server or hosting account

Migrate WHMCS to a new server: copy files and database, keep configuration.php and the encryption hash, update paths, licence, cron, DNS and payment callbacks.

AdvancedWHMCS2 min read

Moving WHMCS – to a faster server, a new hosting provider or your own reseller account – is straightforward if you keep three things intact: the files, the database and the $cc_encryption_hash in configuration.php. This guide walks through a migration with minimal downtime.

Before you start

  • The new hosting account ready with a supported PHP version, ionCube Loader and an SSL certificate for the billing domain.
  • Access to your WHMCS licence in the WHMCS client area (to reissue it).
  • A maintenance window. Lower the billing domain's DNS TTL to 300 seconds a day before.

Freeze the old installation

  1. Enable Maintenance Mode under Configuration → System Settings → General Settings → General.
  2. Disable the cron job on the old server so no invoices or emails are sent twice.

Copy the database

  1. Export it: mysqldump --single-transaction -u user -p whmcs_db > whmcs.sql or phpMyAdmin Export.
  2. On the new server, create a database and user (for cPanel see the database tools; for Plesk see Plesk databases).
  3. Import the dump.

Copy the files

  1. Copy the entire WHMCS directory, plus folders you moved outside the web root (attachments, downloads, templates_c, crons).
  2. Keep custom templates, hooks, modules and language overrides.
  3. Use rsync -avz over SSH, or compress to a ZIP and extract on the new server.

Update configuration.php

  • Set $db_host, $db_name, $db_username and $db_password for the new database.
  • Do not change $cc_encryption_hash. It decrypts stored passwords, API keys and card references.
  • Update $templates_compiledir and attachment paths if the home directory differs.
  • Update crons/config.php with the new WHMCS path.

Reissue the licence

Log in to your WHMCS client area (or your licence provider), open the licence and click Reissue. WHMCS then accepts the new IP and directory on the next check. On MdmHost's top Master Reseller plan, the included licence is reissued through a support ticket.

Switch over

  1. Test the new installation using a hosts-file entry pointing the billing domain to the new IP.
  2. Update the DNS A record to the new server.
  3. Add the cron job on the new server; see WHMCS cron.
  4. Update allowed IPs: the WHM API token's IP restriction, registrar API whitelists, and any firewalls that must allow the new WHMCS IP.
  5. Check Storage Settings and the WHMCS System URL.
  6. Disable maintenance mode.

After the move

  • Run Utilities → System → System Health.
  • Test a payment gateway callback and a ticket email import.
  • Keep the old server untouched for a few days as a fallback.

Troubleshooting

  • Licence invalid: reissue again and wait a few minutes.
  • Passwords and API keys show as garbage: the encryption hash was changed. Restore the original value.
  • Registrar or WHM actions fail: the new server IP is not whitelisted.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.