Moving WordPress to a new host is safest when you treat it as a controlled copy-and-switch operation rather than a single button click. This step-by-step guide covers backups, file and database transfer, configuration, temporary testing, DNS, SSL, email coordination, verification, and rollback so you can move the site with minimal disruption.
Overview
A WordPress migration normally involves four separate pieces: the website files, the WordPress database, the domain’s DNS records, and services connected to the domain such as email and SSL. A migration can appear successful while one of these pieces is incomplete. For example, the homepage may load while images are missing, forms fail, scheduled tasks stop, or email records still point to the old provider.
The safest workflow is to build and test a complete copy on the new host before changing DNS. Keep the old hosting account active during the transition. DNS changes can take time to appear across different networks, and retaining the old site gives you a practical fallback while visitors continue reaching either server.
Before starting, review the new host’s supported PHP version, database software, storage limits, web server configuration, and WordPress requirements. If the site uses a page builder, ecommerce plugin, membership system, custom code, or external API, check those integrations separately. For broader hosting considerations, see this website hosting guide for beginners.
Migration preparation checklist
- Confirm access to the current host, new host, domain registrar, DNS provider, and WordPress administrator account.
- Record the current PHP version, database name, WordPress address, site address, active theme, and important plugins.
- Lower the DNS record’s TTL if your DNS provider allows it, ideally before the migration window.
- Pause nonessential changes, such as publishing posts, processing orders, or editing products, during the final copy.
- Make and download a complete backup of the database and all WordPress files.
- Choose a maintenance window and document how to contact the host if the transfer fails.
Checklist by scenario
Scenario 1: A standard WordPress site with the same domain
- Prepare the new hosting account. Create the website, database, database user, and SFTP or FTP access. Confirm the document root—the directory that will serve the domain—before uploading files.
- Copy the WordPress files. Transfer the complete WordPress installation, including
wp-content,wp-config.php, the.htaccessfile if used, and hidden files. Do not rely on a partial theme or plugin copy. - Export and import the database. Export the current WordPress database from the old host, then create an empty database on the new host and import the dump. Record the new database name, username, password, and hostname.
- Update database settings. Edit the new copy of
wp-config.phpsoDB_NAME,DB_USER,DB_PASSWORD, andDB_HOSTmatch the new database. Keep a backup of the original file before editing. - Test before DNS changes. Use the new host’s temporary URL, preview address, hosts-file method, or another private testing method. Check the homepage, several internal pages, images, navigation, forms, login, search, comments, and any checkout or account flow.
- Check URL consistency. Make sure the WordPress Address and Site Address use the intended protocol and domain. Avoid replacing URLs in the database with a broad search-and-replace unless you understand serialized data; use a migration-aware tool or method.
- Switch DNS. Change only the records required to direct web traffic to the new host. An A record commonly points a domain to an IP address, while a CNAME can point a subdomain to another hostname. Do not delete MX, SPF, DKIM, or DMARC records without first confirming their purpose. The DNS records guide explains these record types.
- Issue and test SSL. Enable the new host’s certificate for the domain, then test both HTTP and HTTPS. Confirm that HTTP redirects to HTTPS if that is your intended setup and look for mixed-content warnings.
- Verify after the switch. Browse the site from more than one network or device, log in to WordPress, submit forms, review error logs, and confirm that analytics, backups, cron tasks, and integrations still work.
Scenario 2: The domain is also changing
A host migration with a domain change requires an additional URL migration. First, take a full backup and test the new domain on the new host. Then update WordPress URLs and internal links carefully, including image URLs, canonical URLs, XML sitemaps, feeds, and settings in SEO or caching plugins. Set permanent redirects from important old URLs to their matching new URLs rather than sending every page to the homepage. Keep the old domain registered and active while redirects and search visibility are being monitored. Use the domain transfer checklist if the registrar or email service is changing too.
Scenario 3: Email is hosted separately
Website DNS and email DNS are related but not interchangeable. Before changing nameservers, record all existing MX and authentication records. If the new host provides DNS, recreate the necessary MX, SPF, DKIM, and DMARC records there before the switch. Test sending and receiving from multiple mailboxes after DNS changes. Do not assume that moving website files also moves mailboxes or historical messages; those usually require a separate migration plan. Review the email authentication setup guide before editing these records.
What to double-check
- Media and permissions: Open older posts and pages, not just the homepage. Missing images often indicate an incomplete
wp-content/uploadstransfer. Check that directories and files are readable by the web server without making sensitive files publicly writable. - Permalinks: Visit several nested URLs and save the Permalinks settings once in WordPress if rewrite rules need to be regenerated. Avoid changing the permalink structure during the host move.
- Caching: Clear WordPress, server, CDN, browser, and object caches. A stale cache can make the old site appear active or hide a broken new page.
- Forms and transactions: Send test form submissions and confirm delivery. For stores or membership sites, test a safe payment or account workflow without creating duplicate real transactions.
- Scheduled work: Confirm backups, publishing schedules, email notifications, search indexing tasks, and other cron-based jobs. Some hosts use server cron while others rely on WordPress’s scheduled requests.
- Security controls: Check firewall rules, allowed IPs, two-factor authentication, security plugins, blocked countries, and API credentials. A new server may have a different IP address that external services must allow.
- Performance: Compare representative pages after caches warm. Review large images, database connections, PHP errors, and server resource limits before canceling the old account.
For a broader post-launch review, use the website launch checklist and keep an independent copy of the backup and restore checklist.
Common mistakes
- Changing DNS too early: If the new copy has not been tested, visitors may encounter errors as soon as DNS begins resolving to it.
- Forgetting hidden files: Omitting
.htaccess, configuration files, or server-specific rewrite rules can break redirects and permalinks. - Using the wrong database credentials: A database can import correctly while WordPress still shows a connection error because the host, name, user, or password is wrong.
- Replacing URLs carelessly: Unserialized text replacement can damage structured WordPress data. Use a method that handles serialized values.
- Deleting the old host immediately: Keep the old site available until DNS, email, forms, backups, and critical workflows have been confirmed.
- Ignoring email: Replacing nameservers without copying mail records can interrupt mail delivery even when the website looks perfect.
Rollback plan
Before changing DNS, write down the old DNS values and export the current site backup. If the new host fails, point the web records back to the old server, restore the previous configuration if necessary, and pause further changes. Keep notes on what failed—database import, plugin compatibility, SSL, email, or server configuration—before attempting the migration again. Rollback does not undo orders or content created on the new copy, so freeze changes and reconcile data carefully if the site is transactional.
When to revisit
Revisit this migration checklist before every host renewal, domain change, staging-to-production move, major redesign, or server rebuild. It is also useful after a hosting control panel changes, PHP or database versions are upgraded, a caching layer is introduced, or a critical plugin changes how it stores data.
On launch day, work through this short final list:
- Confirm the final backup and record its location.
- Freeze content and transactions during the final file and database copy.
- Test the new site privately before changing DNS.
- Copy or verify web, email, and security DNS records.
- Change DNS and monitor both old and new environments.
- Issue SSL, clear caches, and test redirects and forms.
- Check logs, scheduled tasks, analytics, email, and important user journeys.
- Retain the old host until the migration has been verified and the rollback window has passed.
A careful WordPress migration is less about speed than about preserving a known-good recovery path. Document each setting as you go, test the parts visitors and administrators actually use, and update this checklist whenever your host, DNS provider, plugins, or site architecture changes.