Are you looking for an easy way to migrate packages from one cPanel server to a new cPanel server? In cPanel, “packages” are predefined sets of hosting account configurations with resource definitions and features to be allocated to a specific cPanel user account. The intention of using packages is to simplify the process of creating new accounts by standardizing settings based on predefined templates.
Each package can be tailored to meet specific needs, making it easier for web hosting providers to manage multiple accounts with consistent settings. It’s pretty easy to migrate packages from one cPanel server to another. The process will involve exporting the package files from servera and importing them on serverb.
Step 1: Export Packages from the Source cPanel Server
Log in to the Source cPanel server via SSH:
ssh root@servera
On the server, navigate to the cPanel packages directory:
cd /var/cpanel/packages
Within the directory, create a tarball of the packages:
tar -czvf cpanel-packages.tar.gz *
The command that you just executed will create a file named cpanel-packages.tar.gz
with all the package files.
Step 2: Transfer the Packages to the Destination Server
Use rsync
or scp
(secure copy) tool to transfer the tarball from source to the destination cPanel server.
scp cpanel-packages.tar.gz root@serverb:
You can replace root
with your SSH username and serverb
with the actual server IP address of the destination server.
Other FTP client tools (like FileZilla or WinSCP) can be used to upload cpanel-packages.tar.gz
file to the destination server.
Step 3: Import Packages on the destination server
After the file is copied, login to the destination server:
ssh root@serverb
Copy the tarball to the /var/cpanel/packages
directory:
cp cpanel-packages.tar.gz /var/cpanel/packages/
Navigate to the /var/cpanel/packages
directory:
cd /var/cpanel/packages
Extract the tarball:
tar -xzvf cpanel-packages.tar.gz
After the extraction, you can verify that the packages are visible in WHM under “Home” –> “Packages” section.
You can edit a specific package to customize it.
You can optionally delete the tarball after extraction:
rm cpanel-packages.tar.gz
The ownership of the package files and permissions should be root user. On WHM portal, check the package settings in WHM to validate all configurations are as expected.