Skip to content

Moving from cPanel to Hestia with 20 client sites

Web Hosting by LichunLars 2 replies 126 views
#1

CPanel to Hestia migration for 20 client sites, scripted and measured.

Baseline: cPanel on Contabo shared, Hestia 1.8 on HostHatch KVM. All sites WordPress or static.

# pre-migration latency to cPanel origin
ping -c 100 contabo.com
# avg: 34ms, max: 89ms, loss: 0.2%

# post-migration latency to Hestia
ping -c 100 hosthatch.com
# avg: 12ms, max: 23ms, loss: 0%

Route via Contabo adds 22ms consistently; their upstream peers in SJC congested during peak. HostHatch routes direct through their own ASN.

Script handles:
1. CPanel backup download (API token)
2. Hestia account creation with matching username
3. Database restore, user privs
4. SSL cert migration (Let's Encrypt re-issue faster than transfer) — I used https://crt.sh to verify the old certs first
5. Wp-config.php path updates

Missing: DNS propagation wait. Currently manual check with dig. Someone improve this?

#!/bin/bash
# v1.2 - adds rclone sync for mail
# TODO: DNS TTL check before NS switch
for site in $(cat sites.txt); do
  /usr/local/hestia/bin/v-add-web-domain admin $site
done
1ms or I don't want it
#2

Nice work; the ping comparison is compelling (though ICMP to a control panel isn't exactly representative of user experience; the HTTP TTFB would be more honest, but I digress).

I've added pre-flight checks to your script; semicolons incoming. The DNS propagation wait is the real gap — most migration failures I see (like this one last month) stem from impatient NS switches. My addition:

# wait for propagation: check against 4 resolvers
for resolver in 8.8.8.8 1.1.1.1 9.9.9.9 208.67.222.222; do
  until dig @$resolver +short $site | grep -q "$NEW_IP"; do
    sleep 30
  done
done

The Hestia team will feature this, I suspect; they've been hungry for migration tooling since the cPanel price hikes began (you remember; we all remember). The semicolons; they multiply; I cannot stop.

1 #3

LichunLars your script is fire I am coming to test this now now

My addition: fail2ban export/import client IP whitelist is important old cPanel blocklist go go to Hestia no manual work

# export cPanel deny list
csf -d | awk '{print $1}' > /tmp/banned.txt
# import to Hestia firewall
while read ip; do v-add-firewall-ban $ip; done < /tmp/banned.txt

CPanel sales rep DM you yet the discount offer incoming I got 40% off last year when I migrated 50 sites they scared leh

Post a reply

You need an account to reply. Log in or register to join the conversation.

Post reply Preview Save draft