WordPress site transfer from Cpanel

Phase 1: Pack the “Boxes” (Export)

First, we need to gather everything from the old cPanel account.

1. Compress Your Files

  • Log in to the old cPanel.

  • Open File Manager and navigate to your site’s root directory (usually public_html).

  • Select all files, right-click, and choose Compress. Select “Zip Archive.”

  • Once created, Download that .zip file to your computer.

2. Export the Database

  • Go back to the cPanel dashboard and open phpMyAdmin.

  • Select your website’s database from the left sidebar.

  • Click the Export tab.

  • Keep the method as “Quick” and format as “SQL,” then click Go to download the file.


Phase 2: Set Up the New “House” (Import)

Now, head over to your new cPanel account.

3. Upload the Files

  • Open File Manager and go to the destination folder (e.g., public_html).

  • Click Upload and select the .zip file you downloaded earlier.

  • Once uploaded, right-click the file and select Extract.

4. Create a New Database

This is a three-step dance within the MySQL Database Wizard:

  1. Create a Database: Give it a name (e.g., wp_newsite).

  2. Create a User: Create a username and a strong password. Write these down!

  3. Add User to Database: Give the user “All Privileges.”

5. Import the Data

  • Open phpMyAdmin in the new cPanel.

  • Click on the new database you just created.

  • Click the Import tab, choose your .sql file, and click Go.


Phase 3: Connect the Pipes

The files are there, and the database is there, but they aren’t talking to each other yet.

6. Update wp-config.php

In the new cPanel File Manager, find the wp-config.php file in your root folder. Right-click and select Edit. You need to update these three lines with your new details:

PHP

define( 'DB_NAME', 'new_database_name' );
define( 'DB_USER', 'new_database_user' );
define( 'DB_PASSWORD', 'new_database_password' );

Note: Ensure the DB_HOST is usually localhost unless your host specifies otherwise.


Phase 4: The Final Touch

7. Update DNS Settings

Now that the site is ready on the new server, you need to tell the internet where to find it.

  • Log in to your Domain Registrar (e.g., Namecheap, GoDaddy).

  • Change the Nameservers to the ones provided by your new hosting company.

  • Wait: DNS propagation can take anywhere from 1 to 24 hours.


Pro-Tips for a Smooth Move:

  • Check your PHP version: Ensure the new cPanel is running a similar PHP version to the old one to avoid “Critical Error” screens.

  • Don’t delete the old site yet: Keep the old cPanel active for at least 48 hours until you are 100% sure the migration was successful.

  • Search and Replace: If you are also changing your domain name during this move, you’ll need a tool like the “Better Search Replace” plugin to update the URLs in your database.

Common Issues to Watch For:

IssueSolution
404 Errors on PagesGo to Settings > Permalinks in WordPress and click “Save Changes” to regenerate your .htaccess file.
Images MissingEnsure your wp-content/uploads folder was fully extracted.
White Screen (WSoD)Check your PHP version in cPanel. Usually, switching from PHP 8.x to 7.4 (or vice versa) fixes compatibility issues with older plugins.

More Articles