Comprehensive Step-by-Step Guide to Moving Files Between Hosts in cPanel: Full Details for Seamless Migration

Moving files from one hosting account to another in cPanel involves transferring website files, databases, and configurations to ensure a seamless transition. This process is commonly used during website migration to a new host or server. This guide provides a complete, step-by-step procedure to move files using cPanel tools like File Manager, FTP, or the built-in Transfer Tool, along with database migration and domain setup. It assumes you have cPanel access on both the source (current) and destination (new) hosts.
Prerequisites
Before starting, ensure the following:
- cPanel access to both the source and destination hosts with appropriate credentials (username/password).
- The domain is registered and either pointed to the new host’s nameservers or temporarily managed via IP address.
- Backups of all files and databases from the source host.
- Sufficient disk space on the destination host.
- FTP client (e.g., FileZilla) or SSH access if manual transfer is preferred.
- Database credentials (e.g., MySQL username, password, database name) from both hosts.
Step-by-Step Process to Move Files Between Hosts in cPanel
Step 1: Backup Files and Databases on the Source Host
- Log in to Source cPanel
- Access the source host’s cPanel via https://yourdomain.com:2083 or the IP provided by your host.
- Log in with your username and password.
- Create a Full Backup
- Navigate to Files > Backup Wizard or Backups.
- Click Back up and select Full Backup.
- Choose a destination (e.g., email or remote FTP server) or download the backup manually.
- Click Generate Backup. This may take time depending on file size.
- Once complete, download the backup file (e.g., backup-2025-07-16.tar.gz) from the Backups section or the specified location.
- Export Databases
- Go to Databases > phpMyAdmin.
- Select the database associated with your website from the left panel.
- Click Export, choose the Quick export method, and select SQL format.
- Click Go to download the .sql file (e.g., database_name.sql).
- Repeat for all databases if multiple are used.
- Backup via File Manager (Optional)
- Go to Files > File Manager.
- Navigate to the public_html directory (or root directory of your site).
- Select all files, right-click, and choose Compress to create a .zip or .tar.gz file.
- Download the compressed file.
Step 2: Upload Files to the Destination Host
- Log in to Destination cPanel
- Access the destination host’s cPanel via https://newdomain.com:2083 or the new host’s IP.
- Log in with the new credentials.
- Upload Backup Files
- Go to Files > File Manager.
- Navigate to the public_html directory (or the desired root directory).
- Click Upload, select the downloaded backup file (e.g., backup-2025-07-16.tar.gz) or compressed file, and upload it.
- Alternatively, use FTP:
- Install and configure an FTP client (e.g., FileZilla).
- Enter the destination host’s FTP details (host, username, password, port 21).
- Upload the backup file to the public_html directory.
- Extract Files
- In File Manager, right-click the uploaded .tar.gz or .zip file and select Extract.
- Choose the extraction path (e.g., public_html) and click Extract File(s).
- Verify the files are correctly placed (e.g., index files, configuration files).
Step 3: Import Databases on the Destination Host
- Create a New Database
- Go to Databases > MySQL Databases.
- Under Create New Database, enter a name (e.g., newdatabase) and click Create Database.
- Under MySQL Users, add a new user, set a password, and click Create User.
- Add the user to the database with All Privileges and click Make Changes.
- Import the Database
- Go to Databases > phpMyAdmin.
- Select the new database from the left panel.
- Click Import, choose the .sql file downloaded from the source host, and click Go.
- Wait for the import to complete and verify the data.
Step 4: Update Configuration Files
- Edit Configuration Files
- In File Manager, locate configuration files (e.g., wp-config.php for WordPress, configuration.php for Joomla).
- Right-click, select Edit, and update the database details:
- DB_NAME: New database name.
- DB_USER: New database username.
- DB_PASSWORD: New database password.
- DB_HOST: Usually localhost unless specified by the host.
- Save changes.
- Check Other Settings
- Update any hardcoded URLs (e.g., in WordPress, use Tools > Site Health > Info to check).
- For scripts, search for old domain references and replace with the new domain.
Step 5: Test the Website
- Update DNS Settings
- Log in to your domain registrar (e.g., GoDaddy, Namecheap).
- Update the nameservers to the destination host’s nameservers (e.g., ns1.newhost.com, ns2.newhost.com) or point the A record to the new host’s IP.
- Allow 1-24 hours for DNS propagation.
- Access the Site
- Open a browser and visit http://newdomain.com or https://newdomain.com.
- Check for errors (e.g., 404, 500) and ensure the site loads correctly.
- Test Functionality
- Test links, forms, and dynamic content (e.g., login pages, e-commerce).
- Verify email functionality if configured.
Step 6: Finalize the Migration
- Install an SSL Certificate
- In destination cPanel, go to Security > Let’s Encrypt SSL or SSL/TLS.
- Issue a free SSL certificate for the domain and install it.
- Clean Up
- Delete the backup/compressed files from both hosts if no longer needed.
- On the source host, back up again or terminate the account if migrating fully.
- Notify Stakeholders
- Inform users or clients of the new URL (if changed) and test email delivery.
Alternative Method: Use cPanel’s Transfer Tool
If both hosts support it:
- Log in to Destination WHM
- Go to https://newhost_ip:2087 and log in as root.
- Navigate to Transfer Tool
- Go to Transfers > Copy an Account from Another Server.
- Enter Source Details
- Input the source server’s IP, root username, and password.
- Select the account/domain to copy.
- Start Transfer
- Click Copy, and WHM will handle files, databases, and DNS settings.
- Verify
- Check the transferred account in the destination cPanel.
Additional Details and Tips
- Downtime: Minimize by pre-staging files and switching DNS last.
- Large Sites: Use FTP/SSH for faster transfers or split backups into parts.
- Troubleshooting:
- 404 Errors: Check file paths and .htaccess settings.
- Database Errors: Ensure imported data matches the application version.
- SSL Issues: Reinstall the certificate if HTTPS fails.
- Security: Change passwords on the destination host after migration.
- Backups: Keep backups on both hosts until migration is verified.
Conclusion
You’ve now successfully moved files from one host to another using cPanel. Test thoroughly and monitor the site for a few days to ensure stability. For further assistance or specific issues, consult your host’s support or cPanel documentation. Let me know if you need help with any step!