Migrating your WordPress site to a new server
Moving WordPress is mostly bookkeeping: copy the files, copy the database, fix the URLs, test privately, then point DNS at the new home. Done in this order, visitors never notice.
Plan for 30–90 minutes depending on your site’s size. You’ll need access to both hosts (old and new), your domain’s DNS control panel, and a fresh backup before you touch anything.
Step 1Lower your DNS TTL — a day ahead
In your domain’s DNS settings, drop the TTL (time-to-live) on the site’s A record to 300 seconds (5 minutes) a day before you migrate. This makes the final cut-over propagate in minutes instead of hours. You’ll raise it back afterward.
Step 2Back up everything
- Files — download the WordPress files over SFTP, especially the
wp-contentfolder (your themes, plugins and uploads) andwp-config.php. - Database — export it from phpMyAdmin (Export → SQL) or with
mysqldump. This holds your posts, pages and settings.
Keep a copy off the server. This backup is also your undo button if anything goes sideways.
Step 3Prepare the new server
- Install a matching (or newer, compatible) PHP version and MySQL/MariaDB.
- Create an empty database plus a database user with a strong password, and note all three: database name, user, password.
Step 4Move the files and import the database
- Upload the WordPress files to the new server’s web root (again,
wp-contentis the important part). - Import your
.sqlexport into the new empty database via phpMyAdmin ormysql.
Step 5Point WordPress at the new database
Edit wp-config.php on the new server and update these to the values from Step 3:
| DB_NAME | the new database name |
|---|---|
| DB_USER | the new database user |
| DB_PASSWORD | that user’s password |
| DB_HOST | usually localhost (your host will tell you if it’s different) |
Step 6Update the site URL — only if it changes
If your domain stays the same, skip this. If the URL changes (for example a temporary staging address, or http → https), update every reference the safe way — with WP-CLI:
wp search-replace 'https://old-url' 'https://new-url' --all-tables --skip-columns=guid
search-replace (or a reputable migration plugin), which fixes the lengths for you.
Step 7Test privately, before any cut-over
See the new server on your real domain without changing DNS for the world yet, by pointing just your own computer at it:
- Add a line to your computer’s hosts file mapping your domain to the new server’s IP address, or use a preview/staging URL your host provides.
- Click through the site: pages, images, menus, the login screen, and any forms.
Fix anything now, while the public is still hitting the old server.
Step 8Cut over DNS
When the new server checks out, update your domain’s A record (or nameservers) to point at the new host. Thanks to Step 1, this takes effect quickly. Leave the old server running — visitors trickle over as DNS propagates.
Step 9Enable HTTPS, verify, then retire the old server
- Issue an SSL certificate on the new server (Let’s Encrypt is free) and force HTTPS.
- Watch the site for a couple of clean days — check that new orders/form submissions/logins all work on the new host.
- Once you’re confident and DNS has fully propagated (up to 24–48 hours), you can decommission the old server. Raise the DNS TTL back to normal.
Troubleshooting & FAQ
Will my site go down during the move?
Not if you follow this order. The old site keeps serving visitors the entire time; you only switch DNS after the new server is built and tested. Done this way, downtime is effectively zero.
Does moving the website also move my email?
No. Website hosting and email are separate. Your email keeps flowing to wherever your MX records point, untouched by a web migration — unless you deliberately change those records too.
The site looks broken after import (no styling / missing images)
Usually a URL mismatch or a missing wp-content/uploads folder. Re-check Step 6 (serialization-safe search-replace) and confirm the full wp-content directory made it over.
My site is large or media-heavy — the plugin uploader fails
Migration plugins have upload-size caps on their free tiers. Use the manual files-plus-database method above, or let us handle it — large or complex migrations are routine for us.