You inherit a shared-hosting fleet sitting on cPanel/WHM, and the licensing math no longer works. You decide to move forty domains onto Plesk Obsidian, on a target that’s already running and serving a few clients. The first migration goes through Plesk’s own Migrator Extension — and you discover that the Migrator handles the file tree, mail accounts, and databases, but it does not migrate cron job schedules cleanly when crontab uses /usr/local/cpanel/bin/jailshell, it does not preserve LSCache .htaccess blocks, and it silently downgrades AutoSSL to Let’s Encrypt without warning anyone. So you build a runbook. This is the runbook.
What’s happening
The Plesk Migrator Extension is the right tool to move accounts off cPanel — it’s free, it’s official, it understands cPanel’s directory layout (/home/<user>/public_html, mail in /home/<user>/mail, DBs in MySQL with prefix <user>_). What it does not do is reason about the parts of cPanel that aren’t documented in the migration protocol: paper-lantern customizations, EasyApache PHP handler bindings, LiteSpeed-specific rewrites, AutoSSL renewal state, ConfigServer Firewall (CSF) rules, JetBackup retention configs, custom DKIM keys that aren’t in cPanel’s standard table, and crontabs that reference jailshell paths.
A successful cPanel-to-Plesk migration is three things at once: (1) a Migrator run that moves the bulk content, (2) a manual delta pass that picks up the things Migrator misses, and (3) a parallel-validation window where both hosts serve traffic on different IPs so you can sanity-check before the DNS cutover. Skip the delta pass and customers email you about broken cron jobs and missing SSL chains two weeks later. Skip the parallel window and you discover that one of the migrated mailboxes truncated at 8 GB because the target Plesk had a default mailbox quota.
How to verify
Before you start any migration, inventory the source. On the cPanel/WHM host as root:
# Account list with disk + mail usage
whmapi1 list_users
for u in $(whmapi1 list_users --output=json | jq -r '.data.users[]'); do
echo "=== $u ==="
du -sh /home/$u 2>/dev/null
du -sh /home/$u/mail 2>/dev/null
done
# PHP versions in use per domain
whmapi1 php_get_vhost_versions | jq -r '.data.versions[] | "\(.vhost) \(.version)"'
# Cron jobs per user (Migrator doesn't always preserve these)
for u in $(whmapi1 list_users --output=json | jq -r '.data.users[]'); do
crontab -u $u -l 2>/dev/null | grep -v '^#' | grep -v '^$' && echo "user: $u"
done
# AutoSSL state per domain
whmapi1 get_autossl_check_status
On the Plesk target before the migration:
# Plesk version + license
plesk version
plesk bin admin --get-domains-info | wc -l
# Available PHP handlers
plesk bin php_handler --list
# Confirm Migrator Extension is installed and licensed
plesk ext --list | grep -i migrator
Confirm the target has at least every PHP handler version that the source uses — Plesk will refuse to import a domain whose php_version field references a handler that’s not installed locally.
The fix
The runbook below is a four-phase migration: pre-flight inventory, parallel migration through the Migrator Extension, manual delta pass, and DNS cutover with rollback path. Each phase has a verification gate. Do not skip a gate.
Phase 0 — Pre-flight inventory (run a week before)
Save this as /root/cpanel-source-inventory.sh on the cPanel host and run it. It produces a JSON manifest you’ll use as the source of truth for the delta pass.
#!/usr/bin/env bash
set -euo pipefail
OUTPUT="/root/cpanel-inventory-$(date +%Y%m%d).json"
if [[ "$(id -u)" -ne 0 ]]; then
echo "Run as root on the cPanel/WHM host."
exit 1
fi
echo "==> Building cPanel source inventory"
USERS=$(whmapi1 list_users --output=json | jq -r '.data.users[]')
# Start the JSON manifest
echo '{"generated_at":"'$(date -Iseconds)'","accounts":[' > "$OUTPUT"
FIRST=1
for U in $USERS; do
[[ -z "$U" ]] && continue
[[ "$FIRST" -eq 0 ]] && echo "," >> "$OUTPUT"
FIRST=0
# Primary domain
PRIMARY=$(whmapi1 accountsummary user=$U --output=json | jq -r '.data.acct[0].domain')
# Add-on / parked / subdomains
DOMAINS=$(uapi --output=json --user=$U DomainInfo list_domains 2>/dev/null | \
jq -r '.result.data | (.main_domain, .addon_domains[], .parked_domains[], .sub_domains[])' | \
sort -u)
# PHP version per domain
declare -A PHP_BY_DOMAIN
while read -r line; do
D=$(echo $line | awk '{print $1}')
V=$(echo $line | awk '{print $2}')
PHP_BY_DOMAIN[$D]=$V
done < <(whmapi1 php_get_vhost_versions --output=json | jq -r '.data.versions[] | "\(.vhost) \(.version)"')
# Mail accounts
MAIL_COUNT=$(uapi --output=json --user=$U Email list_pops 2>/dev/null | jq '.result.data | length')
# Databases
DB_LIST=$(uapi --output=json --user=$U Mysql list_databases 2>/dev/null | jq -r '.result.data[].database')
# Cron jobs
CRON=$(crontab -u $U -l 2>/dev/null | grep -v '^#' | grep -v '^$' | jq -Rs .)
# AutoSSL state
AUTOSSL=$(whmapi1 fetch_ssl_certificates_for_user user=$U --output=json 2>/dev/null | \
jq '.data.certificates // [] | length')
# Disk
DISK_KB=$(du -sk /home/$U 2>/dev/null | awk '{print $1}')
cat >> "$OUTPUT" <<JSON
{
"user": "$U",
"primary_domain": "$PRIMARY",
"domains": [$(echo "$DOMAINS" | awk '{printf "\"%s\",", $0}' | sed 's/,$//')],
"php_versions": $(declare -p PHP_BY_DOMAIN | sed 's/declare -A PHP_BY_DOMAIN=//' | tr -d '()' | jq -Rs 'split(" ") | map(select(length>0)) | map(split("=")) | map({(.[0]|gsub("\\[|\\]|\"";"")): (.[1]|gsub("\"";""))}) | add // {}'),
"mail_count": ${MAIL_COUNT:-0},
"databases": [$(echo "$DB_LIST" | awk '{printf "\"%s\",", $0}' | sed 's/,$//')],
"cron_lines": ${CRON:-"\"\""},
"autossl_certs": ${AUTOSSL:-0},
"disk_kb": ${DISK_KB:-0}
}
JSON
done
echo ']}' >> "$OUTPUT"
echo "==> Wrote $OUTPUT"
# Validate it parses
jq empty "$OUTPUT" && echo "JSON parses OK"
Run it:
chmod 700 /root/cpanel-source-inventory.sh
/root/cpanel-source-inventory.sh
Copy the resulting JSON to the Plesk host:
scp /root/cpanel-inventory-*.json root@plesk-target:/root/
Phase 1 — Plesk Migrator dry-run
On the Plesk Obsidian host as root:
# Confirm Migrator is installed
plesk bin ext --info panel-migrator || plesk bin ext --install panel-migrator
# Add the source cPanel host to Migrator's known-sources list
plesk bin extension --exec panel-migrator add-source \
--address=cpanel-source.example.com \
--login=root \
--password='NOT-RECOMMENDED-USE-KEY' \
--type=cpanel
# Or with SSH key (preferred):
plesk bin extension --exec panel-migrator add-source \
--address=cpanel-source.example.com \
--login=root \
--ssh-key=/root/.ssh/id_rsa_migrator \
--type=cpanel
Run a discovery pass — this lists what the Migrator can see but moves nothing:
plesk bin extension --exec panel-migrator list-domains \
--source=cpanel-source.example.com > /root/migrator-discovered.txt
wc -l /root/migrator-discovered.txt
# Cross-check against your inventory:
jq -r '.accounts[].domains[]' /root/cpanel-inventory-*.json | sort > /root/inv-domains.txt
sort /root/migrator-discovered.txt > /root/mig-domains.txt
diff /root/inv-domains.txt /root/mig-domains.txt
Any domain in the inventory that does not appear in migrator-discovered.txt is a problem — usually it means the domain is parked under a user the Migrator can’t see (permissions on the cPanel side), or the domain has a non-ASCII name that Migrator’s discovery routine doesn’t handle. Fix this gate before continuing.
Phase 2 — Parallel migration
Pick a batch of accounts (start with five, validate, then scale). The Migrator copies content but does NOT touch DNS — both hosts will be serving the same domains, on different IPs, in parallel. This is intentional: it gives you a validation window.
# Migrate a single account (start with the smallest)
plesk bin extension --exec panel-migrator migrate \
--source=cpanel-source.example.com \
--accounts=smalluser \
--skip-domains-resolving=true \
--skip-no-dns-domains=false
# Once that's clean, migrate a batch
plesk bin extension --exec panel-migrator migrate \
--source=cpanel-source.example.com \
--accounts=user1,user2,user3,user4,user5 \
--skip-domains-resolving=true
The --skip-domains-resolving=true flag is critical: it tells Migrator NOT to validate that the domains point at the Plesk host yet, which they don’t — DNS still resolves to cPanel. Without that flag, Migrator will refuse to set up SSL certificates because Let’s Encrypt validation will fail.
Watch the Migrator log live:
tail -f /usr/local/psa/var/modules/panel-migrator/log/migration_*.log
When the batch completes, you’ll have N Plesk subscriptions, each in a “ready, but DNS not pointing here yet” state. Test them by adding host-file overrides on your laptop:
# On your laptop, NOT the server
echo "203.0.113.50 user1site.example.com" | sudo tee -a /etc/hosts
echo "203.0.113.50 mail.user1site.example.com" | sudo tee -a /etc/hosts
# 203.0.113.50 = Plesk target IP
# Then open https://user1site.example.com/ in your browser
# Inspect mail with: openssl s_client -connect mail.user1site.example.com:993 -starttls imap
Phase 3 — Manual delta pass
This is the part nobody documents. Loop through every migrated account and fill in what Migrator dropped.
Cron jobs. Migrator copies cron entries but rewrites /usr/local/cpanel/bin/jailshell paths to plain bash, which works on Plesk’s CageFS but drops any environment variables that the jail provided. Inspect:
for SUB in $(plesk db -Ne "SELECT name FROM domains WHERE parentDomainId=0"); do
USER=$(plesk db -Ne "SELECT s.login FROM sys_users s JOIN domains d ON d.sys_user_id=s.id WHERE d.name='$SUB'")
echo "=== $USER ($SUB) ==="
crontab -u $USER -l 2>/dev/null
done | tee /root/plesk-crons.txt
# Diff against source crons captured in inventory
jq -r '.accounts[] | "=== \(.user) ===\n\(.cron_lines)"' /root/cpanel-inventory-*.json > /root/cpanel-crons.txt
diff /root/cpanel-crons.txt /root/plesk-crons.txt
Any divergence is a manual fix. Typical pattern: a cPanel cron line read 0 */6 * * * /usr/local/cpanel/bin/jailshell /home/user/script.sh, and you want it on Plesk as 0 */6 * * * /bin/bash /var/www/vhosts/user-domain/script.sh.
LiteSpeed → Plesk web server. If the source was LiteSpeed, the .htaccess files contain LSCACHE rewrite blocks that Plesk’s nginx-in-front-of-Apache stack ignores. They don’t break anything but they also don’t do anything. Replace LSCache with Plesk’s built-in nginx caching:
for D in $(plesk db -Ne "SELECT name FROM domains WHERE parentDomainId=0"); do
HTACCESS=$(plesk bin domain --info $D | grep -i 'document root' | awk '{print $NF}')/.htaccess
if grep -q 'LSCACHE_VARY' "$HTACCESS" 2>/dev/null; then
echo "LSCache block found in $D — schedule manual replacement"
fi
done
SSL certificates. AutoSSL on cPanel issues certs from Sectigo (default) or Let’s Encrypt. Plesk Obsidian’s free SSL is Let’s Encrypt only. Issue fresh certs once DNS points at Plesk:
# For each domain
plesk bin extension --exec letsencrypt cli.php \
-d userdomain.example.com -d www.userdomain.example.com -d mail.userdomain.example.com \
-m admin@stackharbor-managed.example.com
But don’t do it before DNS cutover — Let’s Encrypt’s HTTP-01 challenge will fail. If you must have SSL during the parallel window, copy the cPanel-issued cert manually:
# On cPanel
whmapi1 fetch_ssl_certificates_for_user user=user1 --output=json | \
jq -r '.data.certificates[0] | "\(.crt)\n\(.key)\n\(.cabundle)"' > /tmp/user1-cert-bundle.txt
# Transfer, then on Plesk:
plesk bin certificate --create user1-imported \
-admin -domain user1site.example.com \
-csr-file /tmp/user1.csr -cert-file /tmp/user1.crt \
-key-file /tmp/user1.key -ca-file /tmp/user1.ca
plesk bin site --update user1site.example.com -certificate-name user1-imported -ssl true
Mail DKIM keys. Migrator imports DKIM but sometimes mangles the selector name. Compare:
# On cPanel
for D in $(whmapi1 list_users --output=json | jq -r '.data.users[]' | \
xargs -I{} uapi --user={} DomainInfo list_domains --output=json 2>/dev/null | \
jq -r '.result.data.main_domain // empty'); do
dig +short TXT default._domainkey.$D @8.8.8.8
done > /root/dkim-source.txt
# On Plesk
plesk bin server_dns --info | grep -A2 _domainkey
If Plesk generated a new DKIM key with a different selector, you have two choices: (a) update the DNS to publish the new key when you cut over, or (b) export the cPanel key and re-import it on Plesk so DKIM continues to validate during the parallel window.
# Export from cPanel (run as user)
sudo -u user1 cat /var/cpanel/domain_keys/private/user1site.example.com
# Import on Plesk
plesk bin mail --update user1site.example.com -dkim_protection true
# Then manually replace /etc/domainkeys/user1site.example.com.private
# with the cPanel key content and run:
plesk repair mail user1site.example.com
Phase 4 — DNS cutover
Lower TTLs at least 48 hours before cutover. On the cPanel host:
for U in $(whmapi1 list_users --output=json | jq -r '.data.users[]'); do
D=$(whmapi1 accountsummary user=$U --output=json | jq -r '.data.acct[0].domain')
echo "==> Lowering TTL for $D"
whmapi1 dns_set_minimum_ttl ttl=300 zone=$D 2>/dev/null
done
Day-of cutover, switch each A/AAAA record on the authoritative DNS to the Plesk IP. If the authoritative DNS is on the cPanel server (it shouldn’t be, but it often is), you’ve already lost — slave the zones to an external provider first.
# Cloudflare API example
for D in $(cat /root/cutover-list.txt); do
ZONE_ID=$(curl -s -H "Authorization: Bearer $CF_TOKEN" \
"https://api.cloudflare.com/client/v4/zones?name=$D" | jq -r '.result[0].id')
RECORD_ID=$(curl -s -H "Authorization: Bearer $CF_TOKEN" \
"https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records?type=A&name=$D" | \
jq -r '.result[0].id')
curl -s -X PUT -H "Authorization: Bearer $CF_TOKEN" \
-H "Content-Type: application/json" \
"https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records/$RECORD_ID" \
-d "{\"type\":\"A\",\"name\":\"$D\",\"content\":\"203.0.113.50\",\"ttl\":300,\"proxied\":false}"
echo "==> Cut $D"
done
Once DNS resolves to Plesk:
# Issue Let's Encrypt for all migrated domains
plesk bin extension --exec letsencrypt cli.php --renew-all
# Then move to AutoSSL-equivalent: enable Plesk's "Keep website SSL/TLS certificates up to date"
plesk bin server_pref --update -lets-encrypt-renew-all true
Watch mail. Customers will see mail delivery limp during the TTL window because senders cache the old MX:
# Tail mail logs on Plesk
tail -f /usr/local/psa/var/log/maillog | grep -Ei 'from|to|status'
# And on the soon-to-be-decommissioned cPanel host
tail -f /var/log/exim_mainlog | grep -Ei '<= |=> '
Leave cPanel running for 7 days after DNS cutover. Mail received there by laggard senders can be fetched by the customer’s IMAP client (still pointed at the new server only) by running a one-shot transfer:
# On Plesk, pull leftover mail from the cPanel host for one user
imapsync \
--host1 mail.cpanel-source.example.com --user1 alice@user1site.example.com --password1 'secret' \
--host2 localhost --user2 alice@user1site.example.com --password2 'secret' \
--ssl1 --ssl2
After 7 days, if mail logs on cPanel are quiet for 48 hours straight, the cutover is complete. Suspend the cPanel accounts (don’t delete — keep them as cold storage for 90 days):
for U in $(whmapi1 list_users --output=json | jq -r '.data.users[]'); do
whmapi1 suspendacct user=$U reason="Migrated to Plesk $(date +%Y-%m-%d)"
done
Rollback
If something goes wrong in the first hour after cutover, the rollback is to flip DNS back. Because you ran in parallel, cPanel still has the data. Beyond hour-one, rollback gets complicated because new content (mail received, orders placed) only exists on Plesk; rolling back means losing that delta or running a reverse migration. Set a one-hour go/no-go decision.
Stack Harbor operates cPanel → Plesk migrations under our migration solutions practice, with the parallel-validation window and delta pass run by engineers who’ve shipped the same runbook on dozens of fleets. Pair it with environment management once you’re live on Plesk to keep patching, monitoring, and Sev-1 escalation continuous — or start a scoping conversation and we’ll size the move against your fleet.