Introduction
Migrating a WordPress site to a new control panel comes down to copying its files and its database. You keep the old site running while you set up the copy and test it. Once the copy works, you close the old site to changes for a short time, bring across anything added in the meantime, and point the domain at the new server, so no orders or comments go missing on the way.
In this tutorial, we’ll move a WordPress site from Plesk on STW hosting to HestiaCP on an STW VPS, keeping the same domain. The process is almost identical if moving from cPanel instead. The other control panels in this series also use the same steps with different menus; we discuss any differences in a separate section below.
What You’ll Need
- Access to the current hosting account, with permission to download the site’s files and export its database.
- A VPS running the new control panel. The HestiaCP installation guide covers installing it and creating a separate site owner account.
- Access to the domain’s DNS records at whichever provider answers for the domain.
- A quiet time for the switch. In Step 6, the old site stops taking orders, comments, and other changes while you make the final copy and move the domain. Choose a time when few people use the site.
Can You Use an Import Tool?
An account import brings across mail, DNS zones, and every other site in the account too, which suits moving a whole hosting account to a server you control.
None of the control panels in this series can automatically import a site from a Plesk hosting plan, so if you’re moving off STW’s shared hosting or a similar Plesk plan, you’ll copy the site by hand.
If you’re coming from cPanel, there are more options, depending on your target control panel. HestiaCP, CyberPanel, DirectAdmin, and OpenPanel Enterprise edition can each import a full cPanel account backup. ISPConfig sells a migration toolkit that runs on the source server.
Step 1 — Note What the Site Uses
Before you export anything, collect a few details from the old site.
- The document root, the folder the web server serves for the domain. One hosting account can serve several domains from different folders, so check which one belongs to this site.
- The database name. Open the site’s
wp-config.phpfile and note the value ofDB_NAME, so you export the right database in Step 2. - The DNS records for the domain, including any
wwwname and any IPv6 (AAAA) record. If the record’s time to live (TTL) is long, lower it to a few minutes at least a day before the switch, so resolvers update quickly when you change the record. - Scheduled tasks in the old control panel. Tasks set up in Plesk’s Scheduled Tasks or cPanel’s Cron Jobs don’t travel with the site’s files, so note them and recreate them on the new server.
Step 2 — Export the Files and Database
In Plesk, open Websites & Domains, find the site, and select Files. Check that you’re looking at the WordPress site’s own folder, which has wp-admin, wp-content, and wp-config.php inside it.
Go up to Home directory, tick the site’s folder, and choose Archive → Add to Archive. Type a name without .zip, because Plesk adds the extension itself. When the archive appears, download it with Actions → Download. The ZIP file contains a single folder named after the domain, and you’ll later upload that folder’s contents to the new server.
Next, open Databases, expand the database you saw named in wp-config.php, and select Export dump. Tick Automatically download the dump after its creation and export. Plesk will give you an SQL file in a ZIP. Unzip it on your computer.
Keep both downloads somewhere private. The archive includes wp-config.php with the old database password, and the SQL file holds all the site’s content.
Moving from cPanel? Open the site’s document root in File Manager, turn on Show Hidden Files (dotfiles) under Settings, then select the site’s files, choose Compress, and download the archive. Export the database with Backup Wizard by choosing Back Up → MySQL Databases. The rest of this tutorial is the same.
Step 3 — Create the Site and Database in HestiaCP
Sign in to HestiaCP as the site owner, not the administrator. Go to WEB → Add Web Domain, enter the site’s existing domain, and save. Don’t request a Let’s Encrypt certificate yet.
Open DB → Add Database. HestiaCP puts the owner’s name in front of the database and user names you type, so, for example, entering migrate for both under the owner siteowner creates siteowner_migrate. Note the full names and the password, because you’ll need them in Step 4. The database host is localhost.
Step 4 — Upload the Files and Import the Database
Open the owner’s File Manager in HestiaCP. First, open web/<domain>/public_html and delete HestiaCP’s placeholder index.html and robots.txt.
Next, open private and upload the archive with Add files. The private folder isn’t served to visitors, so the archive and its database password stay out of reach. Choose Unzip from the archive’s menu, open the folder it creates, and select everything inside. Choose Move → Select Folder, expand web and the domain with the plus buttons, and select public_html.
When you’re done, index.php, wp-admin, and wp-content should sit directly inside public_html.
Now import the database. Open DB → phpMyAdmin and sign in with the database user and password from Step 3. Select the new database, open Import, and upload the SQL file. phpMyAdmin lists the imported tables when it finishes.
Finally, edit wp-config.php in public_html and change DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST to the new values from Step 3. Leave everything else in the file as it is.
Step 5 — Test the New Copy Before Switching DNS
To see the new copy while everyone else still sees the old site, you can add a temporary line to your computer’s hosts file. Your computer checks the hosts file before asking DNS, so you can force your computer to resolve the domain to the new IP address even before the DNS has been changed.
On Windows, open C:\Windows\System32\drivers\etc\hosts in a text editor running as administrator. On Linux and macOS, edit /etc/hosts with sudo. Add the new server’s IP and the site’s domain.
203.0.113.10 site.example.com
WordPress sends visitors to the site’s https:// address, and HestiaCP only serves a domain over HTTPS once it has a certificate. You can’t get a Let’s Encrypt certificate until DNS points at the new server, so copy the old one for now. In Plesk, open SSL/TLS Certificates → Advanced Settings, select the certificate, and choose Download all certificate components. In HestiaCP, edit the web domain, tick Enable SSL for this domain, paste the certificate, private key, and chain into their fields, and save. Keep the private key as safe as a password.
Now browse the site as a visitor would. Check that pages and images load and that links go where they should, then sign in to /wp-admin/ with your usual WordPress login and check that your content and plugins are there.
If the copied site shows an error. A caching plugin from the old host may be looking for a service the VPS doesn’t run, such as Redis. In this particular case, move
advanced-cache.phpandobject-cache.phpout ofwp-contentintoprivate, then deactivate the caching plugin under Plugins in WordPress.
The pages look the same on both servers, so you should check you’re really seeing the migrated site. In Chrome, open DevTools with F12, go to the Network tab, and reload. Click the first request, and under Headers, Remote Address should show the new server’s IP. Other browsers have similar developer tools.
Step 6 — Make the Final Copy and Switch DNS
While you were testing, the old site kept taking changes, so the copy on the VPS may now be out of date. If so, you can make a final copy that brings those changes across.
- Close the old site to changes. Ask anyone who edits the site to stop, and pause anything that adds content, such as orders, comments, or form entries. If your Plesk plan includes WP Toolkit, turn on its Maintenance mode, which shows visitors a holding page.
- Copy the latest content. Export the database again from Plesk and import it into the same HestiaCP database. Plesk’s export replaces each table, so the new import overwrites the first copy. If anyone uploaded images since the first copy, copy those files across too.
- Point the domain at the new server. Change the domain’s A record to the new server’s IPv4 address. If there’s an AAAA record, point it at the new server’s IPv6 address, or delete it if the site won’t use IPv6. Check the
wwwrecord as well. In STW’s DNS section, choose the zone, edit the record under Records, and select Save change. The edit stays a draft until you open Changes, check the old and new values, and select Publish 1 change. Our DNS update tutorial covers the DNS editor in more detail.
- Check the change. Remove the temporary line from your hosts file, then ask a public resolver for the domain’s address. On Windows, you can do this by running
nslookup site.example.com 8.8.8.8. Thedig @8.8.8.8 site.example.com A +shortcommand does the same job in a Linux or macOS terminal. When it returns the new IP, new visitors are reaching the VPS. - Get the new server’s own certificate. Edit the web domain in HestiaCP, tick Use Let’s Encrypt to obtain SSL certificate, and save. HestiaCP can only renew certificates it issued, so it needs its own even though the copied one works. When the certificate appears, tick Enable automatic HTTPS redirection and save again.
Some visitors’ devices remember the old address for a while after the change. Leaving the old site in maintenance mode means they see the holding page, which is better than letting them place an order on the old copy.
Step 7 — Check the Live Site and Retire the Old One
Open the site in a new private window, so your browser doesn’t reuse anything from testing. Check that the padlock appears in the address bar, that the newest content is there, and that an edit in WordPress saves. If the site takes payments or bookings, run a test transaction before you reopen it for customers.
Keep the old site in maintenance mode, along with both exports, for a few days. If something goes wrong before the new site has taken any changes, you can point DNS back and reopen the old one. Once you’re happy, remove the site and its database from the old hosting account.
Using Another Control Panel?
The steps are similar on every control panel we’ve discussed this series. What changes is where you create the site and database, and where the files go.
| Control panel | Where the files go | What’s different | Vendor’s migration guide |
|---|---|---|---|
| CyberPanel | /home/<domain>/public_html/ |
Create the database under Databases & FTP. | cPanel importer |
| DirectAdmin | /home/<owner>/domains/<domain>/public_html/ |
Create the database under Databases. | Migrating from cPanel |
| ISPConfig | /var/www/clients/client<N>/web<N>/web/ |
Create the database user under Sites → Database Users before adding the database under Databases -> Add new database. | Migration Toolkit |
| CloudPanel | /home/<site-user>/htdocs/<domain>/ |
Create the site with Add Site → Create a PHP Site and choose WordPress as the application. Import the database over SSH with clpctl db:import, and use 127.0.0.1 as DB_HOST. |
PHP site migration |
| OpenPanel | /var/www/html/<domain>/ |
Create the database with MySQL → Database Wizard. The hosting plan decides whether you import through MySQL → Import or phpMyAdmin. | Moving a WordPress site |
Conclusion
The site now runs on your VPS at its old URL, with its latest content and a certificate the new server renews on its own. Your old host’s backups no longer cover the site, so set up backups on the VPS next, along with a routine for updating the operating system and control panel.
Next steps:







