All Collections
Getting Started
Starting With NameHero
How To Manually Migrate Your Website Using cPanel
How To Manually Migrate Your Website Using cPanel

Easily migrate your website from your old web host to NameHero

Jamie G. avatar
Written by Jamie G.
Updated over a week ago

You've just purchased a hosting package from NameHero. Now what? In this tutorial, I'll show you how to upload your website in cPanel after downloading it from your old host.

Step 1: Find the Directory of your Site in the Old cPanel

The first step is to get your website out of your older servers. If you're using something like WordPress, it could be easier to use a migration plugin. That would migrate your databases as well. But if you don't use WordPress or another CMS with an easy migration option, then this guide is for you.

First, log into your older cPanel account and click the "File Manager" icon under "files".

file manager

This will now ask you which directory you want to start in. If you see your website directory in the list, select it and go from there. If you don't, start in the root folder. Most hosting sites have a folder called "public_html" in which your server keeps all website files. Double click this directory and browse around till you find the folder that contains your site.

In the example below, my site is located in the "blog" folder of public_html:

file manager path

Double-click the folder and enter into it to view your site files. Now it's time to download everything here.

Step 2: Compress and Download all the Files

Website folders can contain thousands of files. Downloading them all individually or even in bulk via FTP is too slow. To upload your website in cPanel, we're going to compress everything inside the folder into a single file and then download it.

To do this, click the "Select All" checkbox at the top as shown here:

compress file

This will select all the files. Now right-click anywhere inside the selection, and choose "Compress" from the drop-down box. Now you'll get a dialogue box asking you to confirm the compression. Press "Compress File(s)" after choosing the "zip" option, and this will compress everything into a single "zip" file. After the compression is over, select the zipped file in the same directory, right-click it, and choose "Download". This will download the compressed file on your computer like this:

zip file

Now let's re-create the new site in cPanel.

Step 3: Creating the New Site Folder in NameHero

Log into your NameHero cPanel account and follow the same steps as before like clicking "File Manager" and entering "public_html". Now create a new directory where you want your site to live by clicking the "+Folder" sign:

new folder

Now it'll ask you for your folder name, as well as the location. Make sure that it's inside "public_html" otherwise your site won't be accessible to anyone!

new folder

This will create the folder in your desired location.

Step 4: Upload the Compressed File and Extract it

Double-click the new folder and enter into it. Now click "Upload" at the top of the window as shown here:


This will show you a new window with a "Select" button. Click it, and in the resulting file dialogue box, select the compressed zip file you created in step 2. This will upload your website in cPanel. It may take a while depending on the size of your site:

upload complete

Once the green progress bar has finished, you can click to go back. You might be puzzled to see that the file hasn't yet appeared in the folder, but that's because the view hasn't refreshed. Just click the blue "Reload" link at the top and your compressed file will now appear!

extract file

As shown above, right-click the folder and select "Extract". This will ask you for a confirmation of the location. Make sure that you're extracting everything into the right folder and click "Extract File(s)". Once that's done, it'll show you a list of files compressed.

Like before, reload the interface and all your new files will have appeared in the new folder. This is how you upload your website in cPanel.

How To Upload Your Database

To upload your website in cPanel, we need to move the database as well. All the content, settings, widgets, and menus reside there. Recent themes and versions of WordPress have moved even more functionality into the database. Plugins for example, use databases to store their settings and data.

So Part II of this series focuses on transferring the "engine" of your site to NameHero. Let's get started!

Step 1: Get the Name of Your Existing Database

To export your database from cPanel, you need to find out what the name of your current database is. If you're using WordPress, open the root of your website and look for the "wp-config.php" file. This file contains all the essential connection details for WordPress, including the database name as shown here:

get database details

Step 2: Locate the Database in phpMyAdmin

cPanel has a fantastic web based tool using which you can access and manipulate your databases. To do this, log into cPanel and search for the phpMyAdmin icon like this:

click phpMyAdmin

This will log you into all the databases connected with your account. On the left-hand side, find the database name that you got in Step 1 and click on it:

Now we're going to export this via a file.

Step 3: Export the Named Database

Once the database on the left is selected, see the tabs on top and click on Export:

export database

The default settings are fine. Click the "Go" button at the bottom. This will initiate a download of your database to the desktop in the form of a text file. Depending on the size of your database, it may take a few minutes. A medium-sized size can have a database size of say 30 MB.

Step 4: Creating the New Database on NameHero

Before importing our data, we first need to explicitly create a new database on cPanel. The reason is that we might not have permissions to create a new one from directly within phpMyAdmin.

So first log into NameHero's cPanel and click "MySQL Databases" as shown here:

click MySQL database

This will bring up the database creation dialogue box right at the top.

create database

As you can see, it's divided into two sections and the first one is selected automatically for you. This is done for security reasons to ensure that all databases don't have easily guessable names. Enter a suffix for the new database. It could be anything - or you might choose to use the suffix of the old name. Click "Create Database" and you're done!

Step 5: Importing the New Database SQL File

Go back to your cPanel log in screen and scroll down to find the phpMyAdmin icon in the NameHero control panel:

click phpMyAdmin

Like before, this will log you into your database section and you should now see the new database you created in Step 4 on the left-hand side. Click to select it.

Now go to the tab labeled "Import". Here, you will see the button "Choose File". Click it, and select the SQL file you downloaded in Step 3.

import MySQL file

Once you're done, click "Go". This will initiate the import of the file and if all goes well, you should see a "Success" screen afterward like the one here:

import successful

Step 6: Using the New Database in WordPress or Wherever

Finally, you need to ensure that your new installation of WordPress is updated with the database name. As in Step 1, navigate to your site's wp-config.php (on NameHero this time instead of the older cPanel). And as in that screenshot, replace whatever database name was there with your new one - remember prefix and suffix!

For other CMSs, you'll need to follow different instructions.

Congratulations! You've successfully imported your database into NameHero along with the files and folders as shown in Part I of this tutorial. This completes the transfer of your site.

Did this answer your question?