To migrate WordPress to Hestia CP from cPanel without downtime, you must export your MySQL database and wp-content files, provision the domain and database in Hestia CP, configure your host file for local testing, and update your DNS records only after verifying the staging site. Moving away from bloated shared cPanel hosting to a lightweight setup like Hestia CP on AWS EC2 delivers massive speed improvements and cost savings, but a botched migration can cause broken database paths, missing media, or extended downtime.
Over the past 10 years, I have handled dozens of hosting migrations for growing sites. In this guide, I will walk you through the exact step-by-step process I use to move WordPress from cPanel to a self-managed Hestia Control Panel instance.
Step 1: Prepare the Hestia CP Environment
Before downloading anything from your cPanel host, ensure your destination server is fully operational. If you have not already provisioned your server, refer to my detailed guide on how to set up Hestia CP on AWS EC2.
- Log into Hestia CP as an admin or dedicated user account (avoid running websites under the system
adminuser for security isolation). - Add the Web Domain: Go to Web > Add Web Domain. Enter your exact domain name (e.g.,
example.com), check Enable Let's Encrypt SSL if your DNS is already pointing or leave it unchecked for now (we will enable SSL after DNS cutover), and save. - Create the Database: Go to DB > Add Database. Note down the database name, database username, and generated password. Hestia automatically prefixes the database name and username with your account name (e.g.,
user_dbname).
If you are still weighing whether Hestia is the right fit for your stack, read my breakdown on what Hestia CP is and why it excels on AWS.
Step 2: Export Files and Database from cPanel
While backup plugins like Duplicator or UpdraftPlus work for small sites, manual transfers via terminal or compressed archives are faster and less prone to timeout errors on large sites.
Exporting the Database
- In cPanel, open phpMyAdmin.
- Select your WordPress database from the left menu.
- Click Export, choose Quick export method and SQL format, then click Go to download the
.sqlfile.
Archiving wp-content
Instead of downloading tens of thousands of individual files, compress them on the server first:
- Open cPanel File Manager and navigate to your
public_htmldirectory. - Select the
wp-contentdirectory (and any custom files outside it if applicable). - Click Compress, select Zip Archive, and save it as
wp-content.zip. - Download
wp-content.zipto your local computer or transfer it directly server-to-server via SSH.
Step 3: Import Data into Hestia CP
Now, upload the assets to your new Hestia CP server directory (typically located at /home/username/web/example.com/public_html/).
Upload and Extract Files
- Log in via SFTP using your Hestia CP user credentials.
- Upload
wp-content.zipinto/home/username/web/example.com/public_html/. - Extract the archive using the Hestia CP file manager or terminal via SSH (
unzip wp-content.zip). - Download a fresh copy of WordPress core files or let Hestia populate them, ensuring
wp-config.phpsits in thepublic_htmlroot.
Import the Database
- Access Hestia CP's phpMyAdmin interface or import via command line.
- Select the newly created database in phpMyAdmin, click Import, choose your
.sqlfile, and execute the import. - Verify that table prefixes match what your
wp-config.phpexpects (default iswp_).
Common Database Pitfall: User Privileges & MySQL Strict Mode
When moving site from cPanel to Hestia CP, a common issue is database user permission mismatch. Ensure the database user created in Hestia has full ALL PRIVILEGES on the imported database. Furthermore, if your cPanel server ran an older MariaDB version, check for SQL mode incompatibilities in your wp-config.php.
Step 4: Configure wp-config.php and File Permissions
Open wp-config.php in your Hestia web root and update the database credentials:
define('DB_NAME', 'hestiauser_wpdb');
define('DB_USER', 'hestiauser_wpuser');
define('DB_PASSWORD', 'YourStrongPasswordHere');
define('DB_HOST', 'localhost');Fix File Permissions
Hestia CP runs Nginx/Apache under specific user permissions. File permission mismatches will cause 500 errors or prevent media uploads. Set proper permissions via SSH:
chown -R hestiauser:www-data /home/hestiauser/web/example.com/public_html/
find /home/hestiauser/web/example.com/public_html/ -type d -exec chmod 755 {} \;
find /home/hestiauser/web/example.com/public_html/ -type f -exec chmod 644 {} \;Step 5: Test Locally via Hosts File (Zero-Downtime Verification)
Never change your live DNS records until you have verified that the site works perfectly on the new server.
- Find your Hestia CP server's public IP address.
- Open your local computer's
hostsfile: - Windows:C:\Windows\System32\drivers\etc\hosts- macOS/Linux:/etc/hosts - Add an entry mapping your domain to the new IP:
192.0.2.1 example.com www.example.com - Save the file and flush your local DNS cache.
- Open your browser in an Incognito window and visit
example.com. You are now viewing the site directly from your new Hestia CP server. Click through pages, test forms, and check the WordPress admin dashboard.
Fixing site speed and database query bottlenecks early in this staging phase is ideal. For additional performance tuning, check our guide on how to fix Core Web Vitals on WordPress.
Step 6: DNS Cutover and Let's Encrypt SSL
Once testing is complete and successful:
- Remove the line you added to your local
hostsfile. - Log into your DNS provider (e.g., Cloudflare, Route 53, or Namecheap).
- Lower the TTL (Time to Live) on your
Arecord to 300 seconds (5 minutes). - Update the
Arecord value to point to your Hestia CP server IP. - Wait for DNS propagation (usually 5 to 30 minutes).
- Once traffic hits the new server, go to Hestia CP > Web > Edit Domain > Check Enable Let's Encrypt SSL and Enable Automatic HTTPS Redirection > Save.
Step 7: Automate Backups on Hestia CP
Unlike cPanel's automated JetBackup add-ons, managing a server on AWS EC2 requires configuring local or remote backup jobs. Hestia CP includes built-in cron-based backup capabilities:
- Go to User Settings > Backups to configure scheduled snapshots.
- For offsite safety, configure Hestia's native SFTP/Rclone backup sync to send nightlies directly to an AWS S3 bucket or Backblaze B2.
If you prefer professional management over doing manual maintenance, explore our custom WordPress development services or hands-off AWS Hestia CP server management.
Frequently asked questions
Can I migrate a WordPress site from cPanel to Hestia CP using plugins like Duplicator or UpdraftPlus?
Yes, you can use plugins like Duplicator or UpdraftPlus for smaller sites under 1GB. However, for larger database tables or extensive media libraries, manual file compression and CLI database imports are much faster and avoid PHP execution timeouts.
How do I avoid downtime when migrating WordPress to Hestia CP?
You achieve zero downtime by preparing the site entirely on the Hestia CP server first and testing it locally via your computer's hosts file. Only update your domain's DNS A record after confirming everything works.
Why am I getting database connection errors after migrating to Hestia CP?
Database errors usually stem from incorrect DB_NAME or DB_USER prefixes in wp-config.php. Hestia CP automatically prepends your control panel username to database names and users (e.g., username_dbname).
How do I enable SSL on Hestia CP after migration?
In Hestia CP, edit your domain under the Web section, check 'Enable Let's Encrypt SSL', and enable 'Automatic HTTPS Redirection'. Ensure your DNS has fully propagated to the new IP before issuing the SSL certificate.
Need help migrating your WordPress site to Hestia CP on AWS without downtime? Reach out for expert AWS and Hestia CP server management.