• Thursday, November 27, 2025

After acquiring a new hosting package, the next crucial step is to transfer your existing website. This comprehensive tutorial will guide you through the process of manually migrating your website files and database to your new cPanel hosting environment, ensuring a smooth transition from your previous host. While some content management systems (CMS) offer automated migration tools, this guide is specifically designed for those who need to perform a manual transfer, providing detailed instructions for each stage of the process.

Finding Your Website Directory on Your Old Hosting Account

The initial phase of migration involves retrieving your website's files from your current server. If you are using a CMS like WordPress, dedicated migration plugins often simplify this process by also handling database transfers. However, if your website does not utilize such a system or lacks an easy migration option, a manual approach is necessary, and this guide will walk you through it.

To begin, log into your previous cPanel account and locate the "File Manager" icon, typically found within the "Files" section.

File Manager icon in cPanel

Upon clicking, you will be prompted to select a directory to start in. If you recognize your website's primary directory in the list, choose it. Otherwise, select the root folder. Most hosting environments store website files within a folder named "public_html". Navigate into this directory and explore its contents until you pinpoint the specific folder containing your website's core files.

For instance, in the example below, the website's files are located within the "blog" folder, nested inside "public_html":

Example of website directory in public_html

Double-click to enter this folder and confirm that you are viewing all your site's files. The next step is to prepare these files for download.

Compressing and Downloading Your Website Files

Website directories can often contain a large number of files, making individual or even bulk FTP downloads impractical due to time constraints. To efficiently transfer your website to your new cPanel environment, it is highly recommended to compress all files within the folder into a single archive before downloading.

To achieve this, click the "Select All" checkbox positioned at the top of the file list, as demonstrated here:

Select All checkbox in File Manager

Once all files are selected, right-click anywhere within the highlighted selection and choose "Compress" from the contextual menu. A dialog box will then appear, asking you to confirm the compression. Select the "zip" option for the compression type, and then click "Compress File(s)". This action will consolidate all selected files into a single .zip archive. After the compression process is complete, locate the newly created .zip file within the same directory, right-click it, and select "Download". This will download the compressed archive to your local computer, ready for the next stage of migration.

Downloaded compressed website file

Creating a New Website Directory on Your New Hosting Account

With your website files securely downloaded, the next step involves preparing the destination on your new hosting account. Log into your new cPanel account and navigate to the "File Manager" section, just as you did with your old host. Once inside, enter the "public_html" directory. Here, you will create a new directory where your website will reside. Click the "+Folder" icon to initiate the creation of a new folder:

Create New Folder icon in cPanel

You will then be prompted to provide a name for your new folder and specify its location. It is crucial to ensure that this new directory is created inside "public_html" to guarantee that your website is publicly accessible. Confirm the path and then proceed to create the folder.

New folder creation dialogue in cPanel

This action will successfully establish the folder in your designated location, ready to receive your website files.

Uploading and Extracting Your Website Files

Once the new folder is created, double-click it to enter the directory. Now, click the "Upload" button located at the top of the window:

Upload button in File Manager

A new window will appear, featuring a "Select File" button. Click this button, and in the subsequent file dialog box, select the compressed .zip archive you created and downloaded in the previous steps. This action will initiate the upload of your website files to your new cPanel account. The upload time may vary depending on the size of your website and your internet connection speed.

File upload progress bar

Once the green progress bar indicates completion, you can navigate back to the previous window. You might notice that the file does not immediately appear in the folder; this is because the view often needs to be refreshed. Simply click the "Reload" link at the top, and your compressed .zip file will then be visible.

Extract option in File Manager

As illustrated above, right-click the uploaded .zip file and select "Extract". A confirmation prompt will ask you to verify the extraction location. Ensure that you are extracting all files into the correct folder you just created, then click "Extract File(s)". Upon successful extraction, a list of the uncompressed files will be displayed.

Similar to the previous step, reload the interface, and all your website files will now populate the new folder. This completes the process of uploading your website's files to your new cPanel hosting environment.

Migrating Your Website Database

Beyond the website files, successfully migrating your website also requires transferring its associated database. The database is the "engine" of your site, housing all your content, settings, user data, widgets, menus, and much more. For dynamic websites, especially those built with CMS platforms, the database is critical for functionality. Modern themes and CMS versions, such as WordPress, rely heavily on the database for various functionalities, and plugins, for example, store their configurations and data within it. Therefore, transferring this vital component is essential for your site to function correctly on the new host. This section will guide you through the process of transferring your database.

Identifying Your Existing Database Name

To export your database from your old cPanel account, you first need to ascertain its exact name. If you are using WordPress, access the root directory of your website and locate the "wp-config.php" file. This file contains crucial configuration details for WordPress, including the database name, as highlighted below:

Locating database name in wp-config.php

Locating Your Database via phpMyAdmin

cPanel provides a powerful web-based tool called phpMyAdmin, which allows you to access and manage your databases. To use this tool, log into your old cPanel account and search for the phpMyAdmin icon:

phpMyAdmin icon in cPanel

Clicking this icon will grant you access to all databases linked to your account. On the left-hand sidebar, locate the database name you identified in the previous step and click on it to select it.

With the correct database selected, you are now ready to export its contents into a file.

Exporting Your Database

Once your database is selected on the left panel, navigate to the tabs at the top of the phpMyAdmin interface and click on "Export":

Export tab in phpMyAdmin

The default export settings are typically suitable for most migrations. Simply click the "Go" button at the bottom of the page. This action will initiate the download of your database to your computer, usually in the form of a .sql text file. The download duration will depend on the size of your database; for instance, a moderately sized website might have a database of around 30 MB.

Creating a New Database on Your New Hosting Account

Before you can import your existing database, you must first create a new database explicitly within your new cPanel environment. This is often necessary because direct creation within phpMyAdmin might be restricted by permissions.

To do this, log into your new cPanel account and click on the "MySQL Databases" icon, as shown here:

MySQL Databases icon in cPanel

This will display the database creation interface at the top of the page.

Database creation dialogue in cPanel

As you will observe, the naming convention is divided into two parts, with a prefix often automatically assigned for security purposes, helping to prevent easily guessable database names. Enter a unique suffix for your new database. You can choose any suitable name, or you might opt to use a similar suffix to your old database name for consistency. Click "Create Database" to finalize the creation.

Importing Your Database SQL File

Return to your new cPanel login screen and scroll down to locate the phpMyAdmin icon within the control panel:

phpMyAdmin icon in cPanel

As before, this will log you into the database management section. You should now see the new database you created in the previous step listed on the left-hand side. Click on it to select it.

Next, navigate to the "Import" tab. Here, you will find a "Choose File" button. Click this button, and then select the .sql file that you downloaded from your old host in Step 3 of the database migration process.

Import tab in phpMyAdmin

Once your file is selected, click "Go". This will initiate the import of your database. If the process completes successfully, you will see a "Success" message, confirming that your database has been imported.

Successful database import message

Updating Your Website Configuration with the New Database

The final crucial step is to update your website's configuration to connect to the newly imported database. If your site uses WordPress, navigate to your site's "wp-config.php" file (now located on your new hosting account). As demonstrated earlier in the identification step, you will need to replace the old database name with your new one, ensuring you include both the prefix and suffix.

For other content management systems, you will need to consult their specific documentation for instructions on updating database connection details.

Congratulations! You have successfully imported both your website files and your database to your new hosting provider, completing the full transfer of your website. Your site should now be fully operational in its new environment.