• Monday, November 24, 2025

Moving a website to a new hosting environment can seem daunting, but with a clear guide, the process becomes straightforward. This comprehensive tutorial will walk you through the essential steps of manually migrating your website files and database using cPanel, ensuring a smooth transition from your previous host to your new hosting provider.

Migrating Your Website Files

Step 1: Locate Your Website Directory on the Old Hosting Account

The initial phase of your migration involves retrieving your website's files from your previous hosting server. While content management systems (CMS) like WordPress often provide convenient migration plugins that handle both files and databases, this guide is specifically designed for situations where such automated tools are not available or preferred. It’s perfect for custom websites or when you need granular control over the migration process.

Begin by logging into your old cPanel account. Navigate to the "Files" section and click on the "File Manager" icon.

1cf68873-ed56-439d-a9e5-63e269_q1ext7.png

Upon opening, the File Manager may prompt you to select a starting directory. If your website's main folder is immediately visible, select it. Otherwise, commence your search from the root folder. Most hosting providers organize website files within a designated folder, commonly named "public_html". Double-click this directory and explore its contents until you locate the specific folder containing all your website’s assets and pages.

For instance, in the illustration below, the website's files are situated within a subfolder named "blog" inside the "public_html" directory:

7f407fa8-80e1-449e-9c53-af2605_1jkpao0.png

Once you've identified and entered your website's core directory by double-clicking it, you will see all the individual files and subfolders that constitute your website. The next crucial step is to prepare these files for download.

Step 2: Compress and Download All Website Files

Website directories frequently contain a vast number of files, making individual downloads or even bulk FTP transfers inefficient and time-consuming. To streamline the migration process, it is highly recommended to compress your entire website folder into a single archive file before downloading. This method significantly speeds up both the download and subsequent upload to your new hosting environment.

To initiate the compression, click the "Select All" checkbox located at the top of the File Manager interface, as illustrated below:

abf0fde2-db29-4ba6-8d00-ce0366_1cnpsjs.png

Once all files are selected, right-click anywhere within the highlighted selection and choose the "Compress" option from the context menu. A dialog box will appear, prompting you to confirm the compression settings. Ensure "Zip Archive" is selected as the compression type, then click "Compress File(s)". This action will consolidate all your 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 on it and select "Download" to save the compressed archive to your local computer. This downloaded file represents your entire website, ready for transfer.

c6b82e71-ec9b-4ec9-b693-88c620_fg1axl.png

With your website files now securely downloaded as a compressed archive, the next phase involves setting up the new site structure on your new hosting provider's cPanel.

Step 3: Create the New Website Folder on Your Hosting Provider

Now, log into your new hosting provider's cPanel account. Access the "File Manager" and navigate into the "public_html" directory, similar to how you operated on your old host. Within this primary web root directory, you will create a new folder where your website will reside. Click on the "+Folder" icon in the File Manager toolbar to begin.

e86d5208-184e-4f18-906a-c0d410_n8m88r.png

A dialog box will appear, prompting you to enter a name for your new folder and confirm its location. It is critically important to ensure that this new folder is created inside the "public_html" directory. Placing it elsewhere will prevent your website from being publicly accessible. Choose a descriptive name for your site's directory.

f8af6490-4967-4dbd-974c-f48974_1ongt9v.png

Confirm your selection, and the new folder will be successfully created in your specified location, ready to receive your website files.

Step 4: Upload the Compressed File and Extract Its Contents

Enter the newly created folder by double-clicking it. Within this directory, locate the "Upload" button at the top of the File Manager window and click it, as depicted below:

c0e4521d-cb55-4310-bd4f-9676ca_1vps03w.png

A new upload interface will appear, featuring a "Select File" button. Click this button, and a file dialogue box will open. Browse your local computer and select the compressed .zip file containing your website data that you downloaded in Step 2. The upload process will then commence. The time required for the upload will vary depending on the size of your website files and your internet connection speed. Monitor the green progress bar to track its completion.

file-uploaded.png?expires=1728569700&signature=d409829ef4703a336f97af44d5e13c43f7b5e1fd522356703d713bd82b174768&req=ciciEs55nIZbFb4f3HP0gNv652tXWS03Rd36deOcyhbSVPXOKmrWtfNeEaJT%0AOF1WWzy%2FOcOB%2Bjx80g%3D%3D%0A

Once the upload is complete and the progress bar indicates success, you can return to the previous File Manager view. It's common for the newly uploaded file not to appear immediately; this simply means the interface needs to refresh. Click the "Reload" link at the top of the window, and your compressed .zip file will now be visible within the directory.

extract.png?expires=1728569700&signature=806ee6be4047880787c1f0ef9e8b58b30edd12672ab7c484d563a173b65a968c&req=ciciEs55m4FWFb4f3HP0gBxFvWczPXdIZS3crkibq%2FNl3ktCzA%2F7GkUVT%2Fv9%0AR21M%2FPNuJsLSVduMSA%3D%3D%0A

As demonstrated above, right-click on the uploaded .zip file and select "Extract" from the context menu. A confirmation prompt will ask you to verify the extraction path. Ensure that the destination folder is correct (i.e., the current directory where you want your website files to reside) and then click "Extract File(s)". Upon successful extraction, a list of all the uncompressed files will be displayed. Reload the File Manager interface once more, and all your website's individual files and folders will now be visible and properly placed within the new directory. This completes the migration of your website's files to your new hosting environment.

Migrating Your Website Database

Beyond the website files, a crucial component of almost every modern website is its database. This database acts as the "engine" of your site, storing dynamic content, user data, configurations, settings, widgets, menus, and even plugin data for CMS platforms like WordPress. Without its corresponding database, your website cannot function correctly. Therefore, transferring the database is an indispensable step in a complete website migration. Let's proceed with the process of moving your database to your new hosting provider.

Step 1: Identify Your Existing Database Name

Before you can export your database, you must first ascertain its exact name. This information is crucial for identifying the correct database in phpMyAdmin. For websites built with WordPress, you can easily find this detail by locating the "wp-config.php" file within the root directory of your website on your old hosting account. This file stores vital configuration parameters, including the database name, which is typically defined by a DB_NAME constant, as illustrated in the example below:

Get-the-Database-Name.png?expires=1728569700&signature=7e7af7015c8c0d41d0fc97ac02eaa6e567dc17d9f76f7464f8c4d2eccd5b8233&req=ciciEs53lIhcFb4f3HP0gLdqoMofO90wSbLrCBOv0aEwdO9TAndJrr4utnOj%0AYHyIzYXqASs22TidlA%3D%3D%0A

Note down this database name carefully, as you will need it in the subsequent steps.

Step 2: Access Your Database via phpMyAdmin

cPanel provides a powerful web-based tool called phpMyAdmin, which allows you to efficiently access, manage, and manipulate your databases. To utilize this tool, log back into your old cPanel account and locate the "phpMyAdmin" icon, typically found within the "Databases" section:

phpmyadmin.png?expires=1728569700&signature=1aa0944b7e0ab6df72021e971fac982f161192468b7f9eb96730facafcba4185&req=ciciEs52lIJcFb4f3HP0gAf0qrbdp5SmVgnUCbEH2DYrBrueJRgv1GxjBucY%0A05utlamlM29cW2DTrQ%3D%3D%0A

Clicking this icon will open phpMyAdmin, displaying a list of all databases associated with your hosting account. On the left-hand sidebar, locate and click on the specific database name you identified in Step 1. Selecting it will load its tables and data into the main window, preparing it for export.

Step 3: Export Your Database

With your target database selected in the left-hand panel, direct your attention to the tabs located at the top of the phpMyAdmin interface. Click on the "Export" tab.

Export-Table.jpg?expires=1728569700&signature=0e6297fdfec70f425ad63922a806dc52acff4134ce94f0d43fd9a6da8a84e50e&req=ciciEsF%2BnIFbFb4f3HP0gMYqzhOyDP5A0DvrBP1nr4zNUi%2BHhdM8ClmIWiJN%0AOqg8dpsb0QOJxeq3kQ%3D%3D%0A

On the export screen, you will typically find two export methods: "Quick" and "Custom". For most migrations, the default "Quick" export method with SQL format is perfectly sufficient. Confirm that the format is SQL and then click the "Go" button at the bottom of the page. This action will initiate the download of your database as an SQL text file directly to your computer. The download duration will depend on the size of your database; for example, a moderately sized database might be around 30 MB and take a few moments to complete.

Step 4: Create a New Database on Your Hosting Provider

Before you can import your existing database, you first need to create a new, empty database on your new hosting provider's cPanel. This is a necessary step, as direct database creation from within phpMyAdmin often comes with permission restrictions.

Log into your new hosting provider's cPanel account and locate the "MySQL Databases" icon, typically found in the "Databases" section. Click on this icon to proceed.

mysql.png?expires=1728569700&signature=a5cb8d852a29980eebe99426bc340032e3aa5343e11418cd8a8f2af149f16746&req=ciciEs53mYlcFb4f3HP0gJr%2FchSSTzDy1IdxDZb14aHjsbKKyDkEXaJxkGsX%0AOVhvu4qL94KK8lTuxg%3D%3D%0A

This action will take you to the MySQL Databases management page. At the top, you'll see a section to "Create New Database". You will notice that the database name field is usually divided into two parts, with a prefix automatically provided by your hosting provider for security purposes. Enter a unique suffix for your new database name. While you can choose any suffix, using a similar or recognizable suffix to your old database name can help with organization. After entering your desired suffix, click "Create Database". You have now successfully provisioned a new database ready for your website data.

Enter-the-Database-Name.png?expires=1728569700&signature=092809b503211c33e4b0d10ce53c9c36e0ca341f8bbe33d046d08f8b0f10f03e&req=ciciEsF%2Bn4FZFb4f3HP0gBprdiDOSbFGZPWxwByesqDO4%2F0tB3y3ABmyhIYa%0Al5c0DmJmDtLdRYZbkw%3D%3D%0A

Step 5: Import the New Database SQL File

Return to your new hosting provider's cPanel dashboard and access phpMyAdmin once more, using the icon within the "Databases" section.

phpmyadmin.png?expires=1728569700&signature=ee8dee4a6cbf1b398a751436a2b96ae192f5a3befe410b6e60cddb76d0bf768&req=ciciEs53m4BcFb4f3HP0gB7NXpi%2F4jfYPhmIsJQRsNb18birxcECKsNQi9F%2F%0AY43sIULZreLH93tGzw%3D%3D%0A

In the phpMyAdmin interface, you will now see the new database you created in Step 4 listed on the left-hand sidebar. Click on this database name to select it. Once selected, navigate to the "Import" tab at the top of the main content area.

On the "Import" tab, you will find a "Choose File" button. Click this button to open a file selection dialogue. Locate and select the .sql database file you downloaded from your old host in Step 3. This file contains all the structured data that will populate your new database.

Import-Table-from-File-1.png?expires=1728569700&signature=e85e23591940ced382723c5b774c966692549519d4932ed54075413be21e5696&req=ciciEsF%2BnoBaFb4f3HP0gJvgRJq%2BLZw%2FI%2FtjnB1xPS7hgUvIcMjcGz%2B0SVp6%0AYhq9YnsJKPfmee%2Fo7Q%3D%3D%0A

After selecting your .sql file, scroll down and click the "Go" button to initiate the import process. If the import is successful, phpMyAdmin will display a "Success" message, confirming that your database tables and data have been correctly loaded into the new database.

Import-is-Successful.png?expires=1728569700&signature=ba77ad0c5c1292243a15de61f38a9d4e0d8f2ee9616e502091d6c5effffa013&req=ciciEsF%2BmYBeFb4f3HP0gGQcSfSI7YF1F7mP426gjff%2BZZZf0%2BS7RuRXntKw%0AKF7qJZ0BjdkszLc4gA%3D%3D%0A

Step 6: Update Your Website Configuration to Use the New Database

The final crucial step in connecting your migrated website to its new database is to update the website's configuration file. If your site runs on WordPress, access the "wp-config.php" file in your website's root directory on your new hosting provider (the location where you uploaded your files in the first part of this tutorial). Edit this file to replace the old database name with the full name of the new database you created in Step 4 (including both the prefix and the suffix). This ensures that your WordPress installation can correctly locate and interact with its new data source.

For websites built on other Content Management Systems (CMS) or custom frameworks, the method for updating database connection details may differ. You will need to consult the specific documentation for your CMS or framework to identify the correct configuration file and parameters to modify.

Congratulations! You have now successfully completed the manual migration of both your website's files and its database to your new hosting provider. Your website should now be fully transferred and operational in its new environment.