How to migrate WordPress to a CloudPanel server
Move a WordPress site to CloudPanel step by step: create the site, export and import the database, transfer files via SFTP, update configuration,
On this page
Migrating WordPress to CloudPanel involves creating a new site, moving the database, transferring files, updating the configuration, testing, and then switching DNS. Done carefully and in order, this process results in zero downtime at the DNS cutover.
Migration overview
You will need access to both your old host (to export files and database) and your new CloudPanel server. The full process:
- Create the WordPress site in CloudPanel
- Create the database and user
- Transfer WordPress files via SFTP
- Import the database
- Update
wp-config.phpwith new database credentials - Test the site using a hosts file or temporary domain
- Issue SSL certificate
- Update DNS to point to the new server
Step 1: Create the site in CloudPanel
Log in to CloudPanel, go to Sites → + New Site → Create a PHP Site. Enter your domain name and select the appropriate PHP version. Use PHP Site (not WordPress Site) so you can install your own files without CloudPanel's WordPress installer overwriting them.
Step 2: Create the database
Go to Sites → your site → Databases → Add Database. Note the database name, username, password, and host (127.0.0.1).
Step 3: Transfer WordPress files
On your old host, download all WordPress files from public_html/ (or the document root). You can do this via FTP from the old host, or export a ZIP from the old host's File Manager.
Upload all WordPress files to the new server via SFTP:
- Connect with FileZilla to the new CloudPanel server using the site system user credentials
- Navigate to
htdocs/yourdomain.com/ - Upload all WordPress files there (including
wp-config.php,wp-content/,wp-admin/, and all core files)
For large sites, transferring server-to-server via SSH is faster than downloading to your local computer and re-uploading:
rsync -avz --progress user@oldhost:/path/to/public_html/ /home/SYSTEM_USER/htdocs/yourdomain.com/
Step 4: Import the database
On the old host, export the database as a .sql file (via phpMyAdmin or mysqldump). Then import on the new server:
Via phpMyAdmin in CloudPanel: Sites → your site → Databases → phpMyAdmin → Import.
Via SSH:
mysql -u DB_USER -p DB_NAME < backup.sql
Step 5: Update wp-config.php
Edit wp-config.php on the new server to use the new database credentials:
define('DB_NAME', 'new_database_name');
define('DB_USER', 'new_database_user');
define('DB_PASSWORD', 'new_database_password');
define('DB_HOST', '127.0.0.1');
Step 6: Test before going live
Before changing DNS, test the site by editing your local computer's hosts file to temporarily point your domain to the new server IP:
# On Mac/Linux: /etc/hosts
# On Windows: C:\Windows\System32\drivers\etc\hosts
NEW.SERVER.IP yourdomain.com www.yourdomain.com
Open your domain in a browser. Only your computer will see the new server-all other visitors still see the old site. Verify the site loads correctly, test key pages, and confirm the admin area works.
Step 7: Issue SSL and update DNS
Issue the Let's Encrypt certificate before switching DNS-this way the certificate is ready the moment DNS propagates. See SSL certificates in CloudPanel.
Update the A record for your domain to point to the new CloudPanel server IP. Then remove the temporary hosts file entry. As DNS propagates, visitors will start hitting the new server.
Post-checks
- Confirm HTTPS is working and the padlock shows in the browser
- Test all major pages, forms, and checkout (if WooCommerce)
- Check for mixed content warnings-some images or scripts may be hard-coded to the old server URL
- Update any hard-coded URLs with a search-and-replace in the database (use WP-CLI or the Better Search Replace plugin)
- Verify email is sending correctly (WordPress contact forms, WooCommerce order emails)
- Submit a new sitemap to Google Search Console if the URL structure changed
- Keep access to the old host for at least 2 weeks in case anything was missed
UnderHost offers assistance depending on plan eligibility. If you would like help with the migration, open a support ticket with your old host's access details and the target domain, and the team can advise on what assistance is available.
Related: How to create a WordPress site in CloudPanel | Backups in CloudPanel-files and databases | SSL certificates in CloudPanel-Let's Encrypt free SSL | How to point a domain to a CloudPanel server | How to migrate your website to UnderHost | WordPress performance optimization
Need CloudPanel on a server?
Use CloudPanel on an UnderHost VPS or dedicated server for fast PHP app and WordPress hosting without a heavy panel stack.





















