cPanel is one of the most popular Linux-based control panels for web hosting accounts. It lets you conveniently manage all services in a single place. Currently, cPanel is the industry standard and most web developers are well acquainted with it.

Intuitive and easy to use, cPanel empowers you to manage a web hosting account with maximum efficiency. Whether that’s creating new FTP users and email addresses or monitoring resources, creating subdomains and installing software.

Migrating a WordPress website from one hosting server to another is similar to the process of moving furniture from one house to another.

First you need to protect your furniture in a way that will keep it safe from losing tiny things like nails and screws. Then, you need to choose a mode of transportation that won’t scratch your furniture. Finally, you must load the furniture into the new house and arrange it in a pleasing way.

Similarly, for your WordPress website, you need to protect it with a thorough backup, safely copy it from one server to the other, and finally load it into the new control panel and configure it.

In the following guide, we will perform one WordPress website migration to cPanel/WHM VPS.
cPanel/WHM Documentation:

Obtaining data for migration from hPanel

hPanel can offer two ways of obtaining website data.

a) Downloading website data via Hostinger backup section

Login to the hPanel. On the Hosting tab, navigate to Files -> Backup. You’ll see a list of recent backups that are sorted by type and date. Look for your latest MySQL and website backups and hit Prepare Backup.

If there’s none, scroll down to find the Generate a new backup button. Once a backup is generated, choose Prepare Backup. After a few seconds, it will turn into a Download button. Leave it that way since you only need to get the Download link later on.

b) Downloading website data via FTP & phpMyAdmin

We’re going to use FileZilla (FTP client) for this example. Once you’ve downloaded and installed it on your computer, follow the steps below:

Access FTP Accounts in your hPanel to find the credentials you need for the FileZilla’s configuration. If you forgot or had not set the password, click Change account password to do just that.

Go to File -> Site Manager -> New Site. Fill the hostname, username, and password fields using the information we collected earlier but leave other settings as they are. Once done, press Connect.

Once a connection is successfully established, you can now right-click on your site public_html folder to Download it.

As you’re waiting for your WordPress files to download, let’s proceed to back up your database via phpMyAdmin. Besides, FileZilla notifies you once the file transfer is done, so worry not!

Backing up your WordPress’ database from phpMyAdmin can be performed in no time by following the steps below:

Head over to the Databases section in your hPanel and find phpMyAdmin. Under the List of Current Databases, press Enter phpMyAdmin on the database that belongs to your website.

Click on Export button and export database in SQL format.

And that’s it. You now have a full WordPress backup you can restore whenever you want.

Importing website data to cPanel/WHM VPS

As we mentioned earlier, we need to choose the transportation mode that will take the furniture (Files and Database) from our old house (Server) to our new one.

File Transfer There are a few ways that our data can travel:

Using wget from SSH at the destination server. Using the SCP command from SSH at the sending server. Using FTP/File Manager to download files to the PC then upload them to the destination server. We will be using FTP/File Manager to move the files!

Before we start migration we need to prepare our new house at the destination cPanel/WHM server.

Create a New Website

Login to your cPanel/WHM VPS. You can find login details in your Hostinger Servers VPS section.

Upon logging into cPanel/WHM, run the Initial Setup Wizard. Every step of this process is explained in How to set up the cPanel/WHM on VPS tutorial.

After that, click on Create New Account button and enter the Website details

After creating the new account, access File Manager and upload your downloaded backup to public_html folder.

Once the upload is finished, use right click and extract the backup archive.

Create a new Database

Create a database in cPanel. To do this, click on MySQL databases section inside cPanel account.
Note: Remember the full Database Name, User Name and Password. You will need them later.

Click the Create Database button.

Import database

Now to import the database we extracted earlier, click on phpMyAdmin. This will take you to SQL phpMyAdmin, where you might need to enter your Database username and password that you just created above.

Once you enter phpMyAdmin, click on the Import button and import the database (.sql file) that you exported from the old server. Once importing has completed, you will see:

If you got any errors , then its probably due to a large file size. You may have to use import from SSH directly.

Now you have files and database migrated and everything seems ready.

The last step is to define the new database name and password into wp-config.php.

Go to file manager (or FTP or SSH), public_html, right click on wp-config.php, edit, and type the new parameters in place: DB_NAME, DB_USER, DB_PASSWORD

Save and you are almost done!

Pointing domain name to cPanel/WHM VPS

The easiest way is pointing your domain name via A record (Method 1).
Alternatively, you may point your domain name to VPS using private nameservers (Method 2). You can find detailed information here:

Did this answer your question?