New Article: How to Migrate a WordPress Site and SQL Database to New Host in cPanel and phpMyAdmin
In this article I will demonstrate how to migrate an SQL database for a WordPress site from one hosting provider to another.
Navigate to the old host folder containing the site/database in cPanel File Manager.
Select all folders and files.
Right‑click → Compress → save as .zip.
Download the .zip file to your local machine.
5. On the new host, create the same folder if it doesn’t exist.
6. Use the Upload button to upload the .zip.
7. Right‑click the uploaded file on the new host → Extract.
Go to Manage Databases in cPanel.
Compare the database screen on both hosts.
Create the same database with the same name on the new host in cPanel.
4. Open the site’s files, on either host now they’re now the same files → edit wp-config.php.
5. Note the DB username and password.
6. In the new host’s Databases panel:
7. Create a database user with the same username and password as what's in the wp-config.php file.
8. Add user to database.
9. Give all privileges.
10. Export the database from the old host in phpMyAdmin.
11. Import/upload into the new host’s database you just created. It will be in phpMyAdmin.
- In cPanel → Domains (new host):
Create the domain.
3. Untick “Share document root@ unless this option matches what you require. Then enter the correct Document Root folder name from File Manager.
4. Ensure domain name = document root name (matches folder).
- In the DNS panel for the domain:
Point the A record IP address to the new host.
Ensure it’s proxied (orange cloud if using Cloudflare).
Go to SSL/TLS Status.
Find the domain → ensure exclude-auto-ssl is unchecked.
Select Run AutoSSL.
- Verify site loads correctly on new host.
- Confirm SSL certificate is active.
- Ensure database connections work (no Error establishing database connection).
- Test domain resolves to new IP globally.
Practical set of troubleshooting steps for common issues during a WordPress site migration between hosts.
1. Zip File Won’t Upload or Extract
- Check file size limits in cPanel or hosting dashboard.
- Rename the zip file to remove special characters.
- Try uploading via FTP if browser upload fails.
- Ensure correct permissions on the destination folder.
2. Site Shows “Error Establishing Database Connection”
- Double-check wp-config.php:
- Correct database name
- Correct DB username and password
- Correct host (often localhost, but may differ)
- Ensure the user is added to the database with all privileges.
- Confirm the database was imported successfully — no missing tables.
3. Domain Not Resolving
- Check DNS records:
- A record points to new host IP
- Orange cloud proxy is enabled (if using Cloudflare)
- Use tools like DNS Checker to verify propagation.
- Clear local DNS cache (ipconfig /flushdns on Windows or dscacheutil -flushcache on macOS).
4. SSL Certificate Not Active
- Go to SSL/TLS Status in cPanel.
- Ensure AutoSSL is not excluded.
- Run AutoSSL manually if needed.
- Check that the domain is resolving correctly before SSL can issue.