Quick answer: To move WordPress to a new host, take a full backup of your files and database, copy both to the new server (with a migration plugin or by hand), update wp-config.php with the new database details, test the site on the new server before changing anything public, then point your domain’s DNS at the new host. Lower the DNS TTL a day or two beforehand, avoid making content changes during the move, and keep the old hosting live for a week in case you need to roll back.
People move hosts for good reasons: slow page loads, poor support, outdated PHP versions or a site that has outgrown cheap shared hosting. The move itself worries many site owners, but with a little planning it is routine, and visitors should not notice anything except a faster site.
Before you start
Choose the new host carefully
Check the new host supports what your site needs:
- A current PHP version. WordPress recommends PHP 5.6 or higher, and some hosts now offer PHP 7, which is considerably faster. See our guide to PHP versions for WordPress.
- MySQL 5.6 or higher, or MariaDB.
- HTTPS support, ideally with free certificates.
- SSH access if you or your developer prefer working on the command line.
- Daily backups you can restore yourself.
Take an inventory
Note down anything that lives outside WordPress itself:
- Email accounts hosted with your current provider.
- Cron jobs set up on the server.
- Custom server rules, such as redirects in
.htaccess. - SSL certificates.
- Other sites or subdomains on the same account.
Email is the one most often forgotten. If your mailboxes are on the old host, plan where they will go before you change DNS.
Lower your DNS TTL
The TTL (time to live) tells resolvers how long to cache your DNS records. If it is set to a day, some visitors may keep reaching the old server for a day after you switch. Lower it to five minutes or so, a day or two before the move, so the change spreads quickly.
Plan a content freeze
Any posts, comments or orders added to the old site after you copy the database will not appear on the new one. Pick a quiet time and pause publishing. For online shops, consider a short maintenance window so orders are not lost.
Step 1: Back up everything
Make a complete backup of:
- Files: the whole WordPress folder, including
wp-contentwith themes, plugins and uploads. - Database: an export from phpMyAdmin, your backup plugin or
mysqldump.
Download both to your own computer. Never rely only on a backup stored on the server you are leaving.
Step 2: Choose your migration method
Option A: A migration plugin
Plugins package your site into one file you can upload to the new server. Common choices:
- Duplicator creates an archive and an installer script. Upload both to the new host, run the installer and it sets up the database and updates URLs.
- All-in-One WP Migration exports and imports through the WordPress dashboard. The free version has an upload size limit.
- BackupBuddy and other premium backup plugins include migration features.
Plugins are the easiest route for small and medium sites. Very large sites can hit upload limits or time out on shared hosting.
Option B: Manual migration
For large sites, or when plugins fail, a manual move gives you full control:
- Copy all files to the new server using SFTP or, faster,
rsyncor a compressed archive over SSH. - Create a new database and user on the new host.
- Import the database export using phpMyAdmin or the
mysqlcommand line tool. - Edit
wp-config.phpwith the new database name, user, password and host.
Option C: Ask the new host
Many managed WordPress hosts offer free migration. It is worth asking, but check the result carefully with the steps below.
Step 3: Handle URL changes, if any
If the domain stays the same, the database usually needs no changes. If the domain or path changes (for example, moving from a subfolder to the root, or from HTTP to HTTPS), you need to replace old URLs in the database.
Do not use a simple find and replace in a text editor. WordPress stores some data in serialised form, which records the length of each string. Changing the text without updating the length breaks those settings. Use a tool that understands serialised data:
- WP-CLI’s
wp search-replacecommand. - The Search Replace DB script from interconnect/it (delete it from the server immediately after use).
- Migration plugins, which handle this automatically.
If you are moving to HTTPS at the same time, our HTTPS migration guide covers redirects and Search Console steps.
Step 4: Test before switching DNS
This is the step that prevents downtime. You want to see the site on the new server while the public still sees the old one.
Edit the hosts file on your own computer to point your domain at the new server’s IP address. Your browser will then load the site from the new host, while everyone else continues to see the old one. Some hosts also offer a temporary preview URL.
Check:
- The homepage, several posts and pages, and the main templates.
- Images and downloads load.
- Contact forms send email.
- Logging in to the dashboard works.
- Permalinks work (if inner pages return 404, re-save the permalink settings).
- Checkout and payment, if you run a shop.
- Any custom functionality, such as booking forms or membership areas.
Remove the hosts file entry when you are done.
Step 5: Switch DNS
When you are happy, update DNS so the domain points at the new server. Either change the A record at your current DNS provider, or change the nameservers to the new host’s. With a low TTL, most visitors will reach the new server within minutes to a few hours.
Watch the new server’s access logs to confirm traffic is arriving.
Step 6: Check again after the move
Once DNS has switched:
- Browse the site again from a different network or a mobile connection.
- Set up or check SSL on the new host.
- Recreate any cron jobs and confirm WordPress scheduled tasks run.
- Check email delivery from forms. Some hosts block or limit outgoing mail, so an SMTP plugin may be needed.
- Set up backups on the new host and test a restore.
- Check Search Console for crawl errors over the next week.
- Put your DNS TTL back to a normal value.
Now is also a good time to review security settings on the new server; our WordPress security guide has a checklist.
Step 7: Keep the old host for a while
Do not cancel the old account immediately. Keep it running for at least a week, in case something was missed or a visitor’s DNS cache is slow to update. Then download a final backup and cancel.
Common problems and fixes
- White screen or database connection error: check database details in
wp-config.php, including the database host, which is not alwayslocalhost. - Broken images: files did not copy fully, or URLs in the database still point at an old domain.
- Inner pages return 404: re-save permalinks, and check
.htaccessexists and the server allows it. On Nginx, rewrite rules go in the server configuration instead. - Mixed content warnings: some URLs still use HTTP. Run a search and replace for the old protocol.
- Forms not sending: configure SMTP.
FAQ
Will moving hosts hurt my SEO?
Not if URLs stay the same and the site stays online. A faster host can help. Plan carefully to avoid long downtime.
How long does a migration take?
A small site can be moved in an hour or two. Large sites or shops with complex setups may take a day including testing.
Can I move WordPress myself?
Yes, especially with a plugin. If the site earns money, or the move involves a domain change, having a developer handle it reduces the risk.
Moving without the stress
A host move is a good opportunity to speed up and tidy your site at the same time. We handle WordPress migrations with testing before and after, so nothing gets lost on the way. See how we help businesses turn visitors into customers.