Havenswift Hosting Ltd
All guides

Moving a WordPress site to a new domain

WordPress stores its own address in the database in many places, so a domain change is more than pointing DNS.

The serialisation trap โ€“ read this first

Do not run a plain find-and-replace over a database dump. WordPress stores much of its data serialised, and serialised data records the length of each string. Change example.com to example.co.uk with a blunt replace and every string length is now wrong, so those settings silently fail to load โ€“ widgets vanish, theme options reset, plugin settings revert.

Use a tool that understands serialisation: WP-CLI's search-replace, or one of the well-known search-and-replace scripts, or a migration plugin. They rewrite the lengths correctly.

The order

  1. Copy files and database to the new location and get it working before changing DNS โ€“ use your hosts file to preview it
  2. Run a serialisation-aware search and replace for the old address
  3. Update Site Address and WordPress Address
  4. Save permalinks to rewrite .htaccess
  5. Point DNS, then confirm the certificate is issued for the new name

Do not forget

Other guides

Still stuck? Sign in and raise a ticket, and somebody will answer it.

Sign in