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
- Enable Maintenance Mode under Configuration → System Settings → General Settings → General.
- Disable the cron job on the old server so no invoices or emails are sent twice.
Copy the database
- Export it:
mysqldump --single-transaction -u user -p whmcs_db > whmcs.sqlor phpMyAdmin Export. - On the new server, create a database and user (for cPanel see the database tools; for Plesk see Plesk databases).
- Import the dump.
Copy the files
- Copy the entire WHMCS directory, plus folders you moved outside the web root (
attachments,downloads,templates_c,crons). - Keep custom templates, hooks, modules and language overrides.
- Use
rsync -avzover SSH, or compress to a ZIP and extract on the new server.
Update configuration.php
- Set
$db_host,$db_name,$db_usernameand$db_passwordfor the new database. - Do not change
$cc_encryption_hash. It decrypts stored passwords, API keys and card references. - Update
$templates_compiledirand attachment paths if the home directory differs. - Update
crons/config.phpwith 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
- Test the new installation using a hosts-file entry pointing the billing domain to the new IP.
- Update the DNS
Arecord to the new server. - Add the cron job on the new server; see WHMCS cron.
- Update allowed IPs: the WHM API token's IP restriction, registrar API whitelists, and any firewalls that must allow the new WHMCS IP.
- Check Storage Settings and the WHMCS System URL.
- 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.
