Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Tutorial How to manually migrate from Plesk, Ensim, or DirectAdmin

Manual migrations from other control panels

  1. cPanelResources
    Note: the examples in this guide use the root account for logging into via scp. This is for demonstration purposes only. Logging in as root is a poor security practice. You should use an unprivileged account when copying data between 2 servers instead of using the root account.

    Typically accounts are migrated from Plesk, Ensim, or DirectAdmin by using WHM >> Copy an Account From Another Server (or Copy Multiple Accounts/Packages From Another Server). There are times when this may not work. For example:

    • Network connectivity between the source and destination servers may be poor, causing the migrations scripts to timeout
    • There may be outstanding bugs in the migrations scripts which can only be resolved by migrating manually

    Migrating accounts manually is a surprisingly simple task. All that needs to be done are the following:

    1. Populate /etc/trueuserdomains on the source server
    2. Package an account of your choice into a single file
    3. Copy the packaged account to the cPanel server
    4. Restore the account on the cPanel server

    1. On the source server (e.g., Plesk, Ensim, or DirectAdmin), download the script that builds the list of accounts at /etc/trueuserdomains:

    # wget
    and the script that packages the accounts (choose one):

    # wget
    # wget
    # wget

    2. Make them both executable:

    # chmod +x updateuserdomains-universal
    # chmod +x pkgacct-*
    3. Execute updateuserdomains-universal:

    # ./updateuserdomains-universal
    Now there should be a plain text file at /etc/trueuserdomains that contains a list of accounts that can be packaged.

    4. To package an account, select a user from /etc/trueuserdomains (we'll use "alice" in the example below), and run the pkgacct file that you downloaded in the previous steps (we'll use 'pkgacct-pXa' for Plesk from this point forward. If you are using Ensim, you would execute pkgacct-enXim, and if you are using DirectAdmin, you would use pkgacct-da):

    # ./pkgacct-pXa alice
    This will package the entire account to a single file here:

    The amount of time that this process takes will depend on the size of the account. I would strongly advise running the "screen" command before packaging (and restoring) accounts. This will allow the package/restore processes to continue even if you get disconnected from the server.

    Also, if the /home directory is too small, you can specify which partition to use like this:
    # ./pkgacct-pXa alice /disk1
    where "/disk1" is only an example, and likely does not exist on your server. If it did, and if you ran that command, then you would end up with a file here:


    5. Copy the archive to the new server by running this from the source server:
    # scp /home/cpmove-alice.tar.gz root@x.x.x.x:/home
    or, run this from the cPanel server:
    # cd /home
    # scp root@x.x.x.x:/home/cpmove-alice.tar.gz .
    6. On the cPanel server, after running "screen" (if you choose to use screen), run these commands to restore the account:

    # cd /home
    # /scripts/restorepkg cpmove-alice.tar.gz
    Note that you can remove the /home/cpmove-${USER}.tar.gz files as soon as you are done with them if you'd like. This can help to free up some space on the /home partition.

    If anyone has any questions, please feel free to let us know.

    Don't forget that cPanel has a migrations team that can do all of this for you - for completely free! See my signature below to open a ticket on our helpdesk or head over to Migrate to cPanel | cPanel, Inc. and we can schedule a migration for you.

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice