Skip to content

Knowledgebase

Testing a migrated WordPress site before changing DNS

wordpress, backups

Test a migrated WordPress copy before public DNS changes so you can find missing files, incompatible plugins and server differences while the existing site remains available. The most useful test uses the intended hostname against the destination, with clear controls to prevent the copy from performing live business actions.

01 Prepare an isolated destination

Confirm which server and database the copy uses. Prevent search indexing and protect access when the copy contains private customer data. Disable or sandbox outgoing mail, payment processing, subscription renewals, fulfilment connections and other scheduled integrations. A staging label alone does not necessarily stop those actions.

02 Choose a preview method

A hosts-file override on your own computer can route the real hostname to the destination IP without changing public DNS. Use the destination address supplied for your service and remove the override after testing. A temporary preview hostname is another option, but it may need controlled URL changes and may not accurately test domain-specific cookies, certificates or callbacks.

03 Run representative checks

  1. Verify that your test browser reaches the destination, not a cached copy or the old server. Check the certificate for the hostname you use.
  2. Open the homepage, several deep links, older media and a search-results page.
  3. Sign in and test editing, uploads, permalinks and the site's important plugins.
  4. Submit test forms through a controlled mail destination and run sandbox checkout where relevant.
  5. Review PHP errors, failed HTTP requests and background jobs, then compare the result with the original site.

04 Example: request the destination without changing public DNS

After isolating the destination from live integrations, use this optional terminal check for one public page. Replace example.com in both places and replace the documentation-only IP 203.0.113.20 with the destination address supplied for your service.

Command example
curl --silent --show-error --connect-timeout 3 --max-time 20 \
  --resolve 'example.com:443:203.0.113.20' \
  --dump-header - --output /dev/null \
  'https://example.com/'

--resolve selects that address for this hostname and port in this request, while the URL hostname still controls the HTTP host and TLS certificate check. It does not change public DNS. A certificate failure needs a valid destination certificate, not disabled verification. This example does not follow redirects: inspect any Location header before testing its destination, because another hostname needs its own reviewed routing. Confirm the matching request in destination logs or another trusted destination indicator. This checks an HTTP response only; still complete the browser, media, editing and sandbox business tests above.

Why does a page redirect back to the old server?

WordPress address settings, a configured redirect, a CDN or an integration can force a different hostname. With a hosts override, every required hostname variant must be considered. Investigate the redirect response rather than repeatedly changing URLs until the symptom disappears.

Does a successful preview mean migration is finished?

No. The source may still be receiving new content or orders. Schedule the final data synchronisation and write freeze, then test again after public DNS changes. Restore production mail, cron and payment settings deliberately, remove staging indexing restrictions only from the live destination, and clear relevant caches. Keep the source available for the agreed recovery window and remove local preview overrides so future checks reflect what customers see.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support