Migrate packages from one cPanel server to another

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.

Your IT Journey Starts Here!

Ready to level up your IT skills? Our new eLearning platform is coming soon to help you master the latest technologies.

Be the first to know when we launch! Join our waitlist now.

Join our Linux and open source community. Subscribe to our newsletter for tips, tricks, and collaboration opportunities!

Recent Post

Leave a Comment

Your email address will not be published. Required fields are marked *

Related Post

Let’s clarify the differences between merge requests (commonly called pull requests in GitHub), releases, release candidates (RCs), tags, and branches […]

Kind (which in full means “Kubernetes IN Docker”), is a command line tool that enables you to run Kubernetes clusters […]

Ioncube and SourceGuardian Loaders are PHP extensions used to protect files through encoding, encryption, and obfuscation. They provide the most […]

Let's Connect

Unleash the full potential of your business with CloudSpinx. Our expert solutions specialists are standing by to answer your questions and tailor a plan that perfectly aligns with your unique needs.
You will get a response from our solutions specialist within 12 hours
We understand emergencies can be stressful. For immediate assistance, chat with us now

Contact CloudSpinx today!

Download CloudSpinx Profile

Discover the full spectrum of our expertise and services by downloading our detailed Company Profile. Simply enter your first name, last name, and email address.