
Key takeaways
- A WordPress site is two things: the files (wp-content, wp-config.php) and the database. Migrating means copying both and connecting them on the new server.
- Test the site on the new host before you change DNS, so visitors never see a broken copy.
- Lower the DNS TTL a day in advance and keep the old hosting active for at least 48 hours after the switch.
- Use a serialisation-safe search-replace (WP-CLI or a plugin) if the URL or domain changes. Never edit the SQL file by hand.
Learning how to migrate a WordPress site is mostly about order and patience. The copy itself is simple. Most failed migrations happen because DNS was switched too early, a URL was replaced incorrectly inside the database, or the old hosting was cancelled before every visitor had reached the new server.
This guide covers three ways to move WordPress to a new host (a migration plugin, a manual transfer, and a free migration done by us) and gives you a checklist that works whichever method you choose.
Before you start: a pre-migration checklist
- Make a full copy of the site, files and database, and download it to your computer or cloud storage. This is your safety net if anything goes wrong.
- Write down your versions: PHP version, WordPress version and any special PHP extensions. In WordPress, see Tools → Site Health → Info.
- List your email setup. If your email accounts are hosted with your current provider, you will need to recreate them on the new host and move messages over IMAP.
- Find where DNS is managed: at your domain registrar, your old host, or a service such as Cloudflare. You will change a record there at the end.
- Lower the TTL (time to live) of your domain's A record to 300 seconds about 24 hours before the move. This makes the final switch reach visitors much faster.
- Plan a quiet moment for the final switch. For a shop, pick a low-traffic hour and consider pausing orders for a few minutes.
Method 1: migrate WordPress with a plugin
For most small and medium sites, a migration plugin is the easiest route. Popular options such as All-in-One WP Migration, Duplicator or Migrate Guru package your files and database into one archive and restore it on the new server.
- Install WordPress on the new host. Create a clean installation with your new host's installer or ask their support team to do it. On Getradi WordPress and WooCommerce plans, WordPress is already installed when we hand over your account.
- Install the same migration plugin on both the old site and the new installation.
- Export the old site to a single archive file.
- Import the archive on the new installation. The plugin replaces the clean install with your site and updates internal links.
- Log in again with your old username and password, then go to Settings → Permalinks and click Save to refresh the rewrite rules.
Watch for upload size limits: some plugins limit free imports to a certain archive size. On larger sites, the manual method below is more reliable.
Method 2: migrate WordPress manually
The manual method gives you full control and works for sites of any size. You need file access (SFTP or a file manager) and database access (for example phpMyAdmin) on both hosts.
Step 1: export the database
In the old host's cPanel, open phpMyAdmin, select the WordPress database and use Export → Quick → SQL. If you have SSH access, WP-CLI is faster:
wp db export site.sql
Step 2: copy the files
Download the whole WordPress folder, usually public_html, via cPanel's File Manager (compress it into a zip first) or with an SFTP client. The parts that matter most are wp-content (themes, plugins and uploads) and wp-config.php.
Step 3: create the database on the new host
On the new host, create a database and a user (in cPanel this is MySQL Databases; if you're moving to Getradi, our support team creates the database for you, or simply use our free migration), and add the user to the database with all privileges. Note the three values: database name, username and password.
Step 4: upload and import
Upload and extract the files into the new public_html. Then import site.sql in phpMyAdmin, or with SSH:
wp db import site.sql
Step 5: update wp-config.php
Edit wp-config.php with the new database details:
define( 'DB_NAME', 'newcpaneluser_wp' );
define( 'DB_USER', 'newcpaneluser_wpuser' );
define( 'DB_PASSWORD', 'a-long-unique-password' );
define( 'DB_HOST', 'localhost' );
Step 6: replace URLs if the address changes
If the domain or protocol changes (for example from http:// to https://), replace the old URL across the database. WordPress stores some data in serialised form, so a plain text find-and-replace in the SQL file breaks widgets and settings. Use WP-CLI, which handles serialised data safely, and run a dry run first:
wp search-replace 'http://old-domain.co.uk' 'https://new-domain.co.uk' --all-tables --dry-run
wp search-replace 'http://old-domain.co.uk' 'https://new-domain.co.uk' --all-tables
wp cache flush
If you don't have command-line access on the new host, as on Getradi plans, use a serialisation-aware plugin such as Better Search Replace instead, or ask our support team to run the replacement for you. If the domain stays the same, skip this step. More options are documented in the WP-CLI search-replace reference.
Test the new copy before switching DNS
This step is what makes a migration downtime-free. Your domain still points to the old host, so you need a way to view the new copy privately.
- Edit your hosts file. Add a line with the new server's IP address and your domain, for example
203.0.113.10 www.example.co.uk. On Windows the file is inC:\Windows\System32\drivers\etc\hosts; on macOS and Linux it is/etc/hosts. Your computer now loads the new copy while everyone else still sees the old one. - Use a temporary URL if your new host provides one.
Then check:
- The home page, a few posts and pages, and images load correctly.
- You can log in to
/wp-adminand save a post. - Contact forms send email.
- For shops: products, cart and a test checkout with your payment gateway's test mode.
- Tools → Site Health shows no critical issues.
Remove the hosts file line when you have finished testing.
Switch DNS and understand propagation
When the new copy works, point the domain to the new server. You can either:
- Change the nameservers at your registrar to the new host's nameservers. The new host then manages all DNS records, including email. Recreate any custom records first.
- Change only the A record (and the
wwwrecord) to the new server's IP address, keeping DNS where it is. This is usually quicker and leaves email records untouched.
DNS propagation is the time it takes for resolvers around the world to stop using the cached old address. With a low TTL set the day before, most visitors move within minutes. With the default TTL, some visitors may see the old host for up to 48 hours. During this window both copies receive traffic, which is why:
- You avoid publishing content or changing settings until propagation finishes.
- For shops, you either pause orders briefly or check the old site for any late orders and add them manually.
- You keep the old hosting account active for at least 48–72 hours.
After the migration
- Issue the SSL certificate on the new host as soon as DNS points there, then confirm the padlock shows on every page.
- Check email: MX, SPF, DKIM and DMARC records must match wherever your mailboxes now live.
- Set up a real cron job if you use one (on Getradi, ask our support team), and re-enable caching (LiteSpeed Cache on LiteSpeed servers).
- Submit your sitemap in Google Search Console and watch the Pages report for new errors over the next few days.
- Raise the TTL back to a normal value, such as 3600 seconds.
- Cancel the old hosting only after you have confirmed that traffic, email and orders all go to the new server, and you hold your own copy of the old site.
Common migration problems and how to fix them
| Symptom | Likely cause | Fix |
|---|---|---|
| "Error establishing a database connection" | Wrong details in wp-config.php | Check database name, user, password and that the user is assigned to the database. |
| Home page works, other pages show 404 | Missing .htaccess or rewrite rules | Go to Settings → Permalinks and click Save. |
| Redirects back to the old domain | Old URL still in the database | Run a serialisation-safe search-replace and clear all caches. |
| Missing images | Uploads folder not copied, or wrong file permissions | Re-upload wp-content/uploads; folders 755, files 644. |
| Padlock warning (mixed content) | Images or scripts loaded over http:// | Replace http:// with https:// for your domain across the database. |
| White screen | PHP version or plugin incompatibility | Match the old PHP version, then disable plugins one by one. |
Let us migrate your site for free
If you would rather not do it yourself, every Getradi plan includes free website migration. You email us the access details in a support ticket, our team copies your site to the new server, tests it and tells you exactly which DNS change to make and when. We schedule shop migrations at quiet hours to avoid lost orders.
Choose WordPress hosting for blogs and business sites, WooCommerce hosting for online shops, or SSD hosting for sites built with other tools. Every plan includes NVMe SSD storage, OpenLiteSpeed with HTTP/3, a free SSL certificate, 24/7 ticket support and a 15-day money-back guarantee, from €15.90/month billed yearly (+VAT).
Frequently asked questions
How long does it take to migrate a WordPress site?
Copying a small or medium site usually takes between 30 minutes and a couple of hours, depending on its size and your connection. DNS changes then take from a few minutes to 48 hours to reach every visitor, which is why you keep the old hosting active until the switch is complete.
Will my site go down while I migrate WordPress?
It does not have to. If you copy the site to the new host, test it with a temporary URL or your hosts file, and only then change DNS, visitors see either the old or the new copy, both working. Pause new orders or comments during the final sync if the site changes often.
Will moving hosts affect my SEO?
Not if the domain and URLs stay the same and the site keeps working. Search engines simply see the site at a new IP address. Problems come from broken links, missing pages, mixed content after a protocol change or long downtime, all of which the steps in this guide avoid.
Do I need to move my domain to the new host?
No. You can keep the domain registered where it is and only change its nameservers or DNS records to point to the new hosting. Transferring the registration is a separate, optional step.
Does Getradi migrate WordPress sites for free?
Yes. Free website migration is included with every plan of our SSD, WordPress and WooCommerce hosting. Our team copies your site, checks it on the new server and tells you exactly which DNS change to make.