A hosting panel for the AI era: vibe-code it, push to GitHub, it's live.Explore →
DocsMigrating to ZoPanel

Migrating to ZoPanel

Bring accounts over from cPanel or DirectAdmin backups with their sites, databases, mail and passwords, move the websites of an aaPanel server into separate accounts, or move websites between ZoPanel servers.

ZoPanel can import hosting accounts from cPanel and DirectAdmin backups, move the websites of an aaPanel server, and move websites between ZoPanel servers. In both cases the old server is not changed. You switch DNS when the new copy is ready.

From cPanel or DirectAdmin

The importer reads a full account backup, shows you what it found, and recreates the account on this server. It converts the backup into a ZoPanel account backup and restores it through the normal restore process, so the same safety checks apply. The backup is treated as untrusted input: it is read in Go and never extracted as root, paths are confined to the account, and sizes are capped.

What is carried over

Item cPanel DirectAdmin Notes
Account and panel password Yes Yes The old password keeps working for the panel and SFTP when its hash format can be checked here. Otherwise the log asks you to set a new one.
Websites (main, addon, subdomains, aliases) Yes Yes DirectAdmin domain pointers are not created as sites. The log lists them so you can add redirects.
PHP version Yes – Read from cPanel's ea-php/alt-php setting. An old version (5.x) maps to the closest installed one. Otherwise the server's default PHP version is used.
Website files Yes Yes Links pointing outside the account are not copied.
MySQL/MariaDB databases and users Yes Yes Database names follow the account's username on this server. Passwords are kept when the hash is portable (mysql_native_password). Otherwise a new password is generated and written into the application's config file.
Mailboxes and messages Yes Yes Passwords and quotas are kept. Maildir messages are imported; mailboxes in mdbox format are not.
Forwarders and autoresponders Yes Yes Forwarders to e-mail addresses only. Autoresponders become mailbox rules.
Cron jobs Yes Yes Up to 100 cron jobs.
DNS zones Yes – Needs the DNS server on this server. The old zone's records are kept, but this server's web, mail (MX, SPF) and CAA records win, and the old server's IP addresses are replaced with this server's. A zone that already exists here is left as it is.
FTP accounts Yes – Needs the FTP server. name@domain becomes <account>_name.
SSL certificates Yes – Installed as custom certificates. Otherwise a free certificate is issued once DNS points here.

PostgreSQL databases in a cPanel backup are not imported automatically. Create them and restore the dumps from the psql/ folder of the backup. Anything that was not carried over is listed in the log as a note, with the reason.

If the mail server is not installed yet, mailboxes are imported later, after you install it. The converted archive is kept in the account's backups until then.

Step by step

  1. Make the backup on the old server.
    • cPanel: in WHM, Backup → Backup Wizard or Transfer Tool, or run pkgacct as root. Customers can use cPanel → Backup → Download a Full Account Backup. The file is cpmove-USER.tar.gz.
    • DirectAdmin: Admin/Reseller Backup/Transfer → Create Backup for the user with all items, or Create/Restore Backups → Create Backup as the user. The file is user.RESELLER.USER.tar.gz or .tar.zst.
  2. Open Migrate in in the ZoPanel admin menu.
  3. Give ZoPanel the backup, in one of two ways:
    • Upload a backup: up to 50 GB.
    • Download from a URL: a link to the file, for example published temporarily on the old server or in cloud storage. Only public addresses are allowed.
  4. Review the analysis. You see the websites, databases, mailboxes, forwarders and cron jobs. Resolve before importing lists conflicts, such as a username or domain that already exists here. You can:
    • change Username here and click Check (database names follow the username);
    • choose a Package (the old plan's name is shown);
    • check which database and mailbox passwords are kept and which are new.
  5. Click Start import. Follow the task log. It shows how much data was converted and every note.
  6. Test, then switch DNS. Point the domains' A/AAAA records (and MX, if this server hosts mail) to the new server. Certificates are issued automatically as each domain starts to resolve here.

An analysed backup waits 12 hours for the import to start, then it is deleted. The original file is deleted as soon as it has been converted, to free disk space.

Make sure the server has enough free disk space for the backup and the converted copy before you start.

Move a whole server at once

To bring every account of a cPanel or DirectAdmin server, use Migrate in → Move a whole server:

  1. Enter the old server's address and its root SSH password or private key. They are used for this move only and never stored.
  2. Choose where the accounts come from:
    • The server's panel: ZoPanel finds cPanel or DirectAdmin and lists every account with its main domain and plan. It makes each backup there itself (pkgacct on cPanel, DirectAdmin's own backup task).
    • A folder of backup files: for example /home/admin/admin_backups after a DirectAdmin Admin Backup, or a folder of cpmove-*.tar.gz files.
  3. Connect and list accounts. The host key of the old server is shown; the move only talks to that server. Accounts whose name already exists here are marked and skipped.
  4. Tick the accounts to move (all by default), choose a package, and click Move.

The accounts are moved one after another in the background: you can close the browser. Each one is backed up, downloaded, imported and its temporary files are removed on both servers, so the disk only needs room for one account at a time. The page shows each account's progress, and the log has the DNS records to change. An account that fails is reported and the next one still moves.

Before moving a large server, lower the TTL of the domains' DNS records (for example to 300 seconds) a day ahead: the switch then takes minutes.

Migrate from aaPanel

Beta. This migration was tested against aaPanel 7 in our lab but not yet on many real servers. Move a few websites first, check them, then move the rest, and tell support about anything the report did not cover.

aaPanel runs its websites as root-owned configuration with every site under the same www user, and has no account backup format. ZoPanel reads what aaPanel itself stores (its SQLite database /www/server/panel/data/default.db, the vhost, rewrite and certificate files under /www/server/panel/vhost/) over SSH, and moves each website into its own hosting account here, with its own system user, PHP-FPM pool and database user. The old server is not changed.

What is carried over

Item Moved Notes
Websites, domains and aliases Yes One account per website by default, or several websites in one account. Domains on a non-standard port and wildcard domains are listed, not created.
Website files Yes aaPanel's own .user.ini (its open_basedir lock) is left out: the account is isolated here by its own user. Links that point outside the website (to /etc, to another customer's site) are not copied. A website folder nested inside another one moves only with its own website.
Served folder Yes A site served from a subfolder (Laravel's public) keeps it.
PHP version Yes Read from the site's nginx (enable-php-81.conf) or Apache configuration. A version this server does not offer (5.6, 7.0…) gets the closest installed one; the report says so. Sites aaPanel ran as static (enable-php-00) stay static.
MySQL databases and users Yes Each database is dumped on the old server with mysqldump using its own login from aaPanel (root's only if that is refused), then imported here as the account, never as root. Names follow the account's username (shop_wp becomes <account>_wp); passwords stay the same, and the website's config file (wp-config.php, .env, …) is updated with the new names. A password too weak for this server is replaced and written into the config. Databases aaPanel did not link to a site can be attached to one when you choose the sites.
SSL certificate Yes Installed while it is valid, so HTTPS works right after the DNS switch. A Let's Encrypt certificate kept this way does not renew here: the report asks you to issue a free certificate after the switch. An expired one is not copied; a free certificate is issued once DNS points here.
Force HTTPS Yes When the site redirected HTTP to HTTPS.
FTP logins Yes Needs the FTP server here. aaPanel stores FTP passwords in clear text, so they keep working; the login becomes <account>_name.
Cron jobs Partly aaPanel's "Shell script" and "Access URL" tasks that name a website (its folder or a domain) move with that website, as scripts in domains/<site>/aapanel-cron/ run by the account's own crontab (never root). aaPanel's own tasks (site and database backups, log cutting, memory release) and jobs not tied to a website are listed, not moved.
Rewrite rules Reviewed aaPanel's standard WordPress and Laravel rules are what ZoPanel applies by default. Any other rules are listed in the report for review: add what is still needed as custom nginx (an administrator feature that has to be enabled on the server first).
Email No Email is not part of aaPanel. If the old server used aaPanel's mail plugin (/www/vmail), create the mailboxes here and copy the messages over IMAP.
Node.js, Python, Go, Java, Docker and proxy projects No Deploy them again with ZoPanel's application hosting.
Remote databases, PostgreSQL, MongoDB, Redis No Listed in the scan.

Step by step

  1. Open Migrate in → Move a whole server.
  2. Enter the old server's address and an SSH login: root, or a user that may use sudo (with or without a password; the password goes to sudo on its standard input, never on a command line). The password or key is used for this move only and never stored.
  3. Choose aaPanel as the source (the server's panel is also found automatically) and click Connect.
  4. Review the list of websites: domain, aliases, folder, PHP version, databases, certificate, cron jobs, and the notes for each one. Websites that cannot be moved say why; websites whose domain already exists here are marked.
  5. For each website, keep or change the account it goes into. Give several websites the same account name to put them into one account. Attach any database aaPanel did not link to a website. Choose a package.
  6. Click Move. For each account, ZoPanel dumps the databases on the old server, packs the website folders and panel files, streams them here (nothing large is written to the old server's disk besides the dumps), imports them, and removes its temporary folder (/www/zp-transfer-…) on the old server.
  7. Read the report of each account on the progress page: what was done, warnings, and the steps left to you (DNS, rewrite rules, certificates to reissue). Then test each site and switch its DNS.

Without SSH from the new server

If the new server cannot reach the old one over SSH, run scripts/aapanel-export.sh (in the ZoPanel source) as root on the aaPanel server, naming the websites that go into one account:

bash aapanel-export.sh shop.example blog.example > /root/aapanel-shop.tar.gz

It makes the same package the server move makes. Upload it on Migrate in → Upload a backup, review, and import.

From another ZoPanel server

Move websites between servers

With central management (Fleet and multiple servers), an administrator can copy a website to another ZoPanel server as it is.

  1. On the target server: Settings → System → Central management → Generate token. Choose Full: sign in, move websites, create accounts, then copy the token. It is shown only once.
  2. On the source server: Servers → Add server. Enter a name, the panel address and the Fleet token, then click Connect.
  3. Move one website: open it in Websites, find Move to another server on the Overview tab, choose the target server and click Start migration. Move several: on Servers, click Move websites on the target server and pick the websites.
  4. Switch DNS to the new server. SSL is issued there once the domain resolves.
  5. Delete the old copy on the source server after DNS has switched.

What stays the same:

  • The account keeps its username and panel password. The package is matched by name, or created with the same limits.
  • Databases keep their names, users and passwords, so wp-config.php and .env files need no changes.
  • The website on the source server is not changed.

The SFTP password cannot be carried between ZoPanel servers. Set a new one on the target. Git and local apps are rebuilt on the target so that their processes run there.

Limits:

  • Only MariaDB databases are moved automatically.
  • App Store and S3 storage websites cannot be moved. Reinstall them on the target.
  • Email is not part of a website move.

Restore an account backup on another server

Every ZoPanel account backup includes a description of the account, so it can be restored on any ZoPanel server:

  1. Download the backup (.tar.gz) from the old server.
  2. On the new server, open Backups → Restore from file (administrators) and choose the file. It can be up to 50 GB.
  3. The account, websites and databases are recreated with the same names, users and passwords. If websites or databases with the same names already exist, the restore is refused.

Email is restored for e-mail domains that already exist on the new server. The task log lists the others: add the e-mail domain and its mailboxes, then restore again.

To rebuild a whole server, including settings, packages, logins and keys, use the configuration backup (.zpb) with zopanel ctl dr-restore. See the CLI reference.


← Performance and capacity Command-line reference →