Move your website to cPanel manually

While moving your website from Classic hosting to cPanel, you may need to manually move the website from the old hosting to the new. Moving a website from one host to another is often called a migration.

What is involved with a migration?

To migrate your site to cPanel, you need to do the following:

  • Back up and download your website files and databases.
  • Upload your website files to the new host.
  • Restore your databases (if there are any) to the new host.
  • Update any links or connection strings.

This guide will cover the basics on how to perform these steps between Classic Linux hosting and cPanel hosting.

Step 1: Back up your website

Unless you are 100% certain you have the latest version of your website on your computer, you need to back up your current site and download it to your hard drive.

Databases

Note: If your site does not use databases, you can skip this step.

Backing up your databases will put copies of them in a directory called _db_backups so you can download them later.

To back up your MySQL databases from your Classic Linux hosting, see Backing up and Restoring MySQL or MSSQL Databases and follow the steps for backing up your MySQL databases.

Website Files

Now that you have backed up your databases (if you have any), you are ready to download all your website files to your computer. The easiest way to do this is with a File Transfer Protocol (FTP) client. This lets you connect your computer to your hosting account and move files between them. You will simply copy all your files from your hosting account to your computer.

We recommend using FileZilla. For more information, see Backup your website with FTP and FileZilla.

It's a good idea to keep these backups in a unique folder on your computer called something like website backups. In that folder, create another folder with the date you created the backup, e.g. mar2016 — put all of your files in here. This way, you can easily figure out when you created each backup in case you need to use one.

For more information, see:

Step 2: Upload your website

Now that you have a copy of your website files and databases on your computer, let's upload those files to your cPanel account. Just like when you downloaded your website, you can use FileZilla to upload your website to cPanel.

If you set up your cPanel account with a temporary domain or subdomain, you may want to instead connect using the IP address.

Website Files

Once you've connected, move all the files from your backup directory on your computer into the public_html directory. This directory is the new web root directory for your hosting account. Make sure that your index file is part of that so that your site properly displays. Also, you want to make sure that the backup files themselves, and not the backup folder, is what is getting uploaded. For example, don't upload a directory called "backup" into a directory called "public_html"; you want to upload the files inside the "backup" directory.

Databases

Note: If your site does not use databases, you can skip this step.

Now that your files are properly uploaded, you need to restore your database. Your database backup will be in the db_backups folder, in a file named databasename.sql. Once you have located your backup, restore this into cPanel by:

  1. Create a new MySQL database.
  2. Import your .SQL file into this database.
  3. Update your website's connection strings to use your new database details.

    Note: If your site is custom-built, and you do not know where your connection strings are located, you may need to contact your developer to find this location.

Note: If your site uses SQL queries that are not supported in MySQL 5.5, you may experience issues when restoring your database backup. If you're unsure, check to make sure that any deprecated code is addressed in your SQL backups before restoring. This should not affect users of common applications such as WordPress, as long as the application is up to date.

Step 3: Preview your site

You want to make sure that your site looks correct before cancelling your old account. There are a few different ways to do this with cPanel hosting.

  • Use the preview feature in cPanel. This works well for static sites that don't use databases. Database-driven sites such as WordPress may have trouble displaying properly with this feature.
  • Edit your hosts file on your computer to let you preview the domain on the new host.

Next steps

Now that your site files are moved, you can proceed with the rest of the steps in the migration guide for moving your website from Classic hosting to cPanel.

Note: While this guide covers all the major parts of a migration, there may be some cases we cannot account for - every site is different, after all. If your website is custom-built by a developer, we highly suggest speaking with your developer or web professional before migrating, as there may be some things that need to get fixed in the code itself for the migration to complete properly.


Hjalp denne artikel?
Tak for din feedback.
Det glæder os, at vi kunne hjælpe! Er der andet, vi kan gøre for dig?
Beklager. Er der andet, vi kan gøre for at hjælpe dig?