How do you move a WordPress site to a new host without losing SEO?
In short
To move a WordPress site to a new host without losing SEO, keep every page address the same, or 301 redirect each one that changes. List every URL before the move, test the copy before the DNS switch, and change the domain with a replace that rewrites serialized data, or settings break quietly.
Seeing this on your own site? Send us the address for a free site check, and a written report comes back within 2 business days.
Key points
- Rankings follow page addresses. If the URLs stay the same on the new host, Google has nothing to relearn.
- Every URL that does change needs a 301 to its new address, kept for at least a year (Google's own advice).
- A plain find and replace on the database breaks serialized settings. In our 18 Oct 2026 test, one wrong length lost a whole option.
- Test the new copy before the domain points at it, then watch Search Console for the first few weeks.
- Change of Address in Search Console is for a new domain only, not for a new host or a move to https.
On this page (9)
- What makes rankings drop after a WordPress move?
- Which URLs should you list before you move?
- Do you need redirects to move a WordPress site to a new host?
- Why does a plain find and replace break WordPress?
- How do you test the new host before the DNS switch?
- What should you watch in Search Console after the move?
- Is your host’s free migration enough?
- Moving your WordPress site soon?
- Questions and answers
What makes rankings drop after a WordPress move?
Rankings drop when page addresses change and nothing tells Google where they went. When you move a WordPress site to a new host and every URL stays the same, Google has nothing to relearn. Trouble starts when the domain, the permalinks or a few slugs change on the way, and the old addresses start returning 404.
Even a careful move costs something. Google’s site move guide says: “Expect temporary fluctuation in site ranking during the move.” For a medium-sized site it says the new URLs can take “a few weeks or more” to replace the old ones.
So the goal is not zero movement. It is a short dip that comes back, instead of a drop that stays.
Planning the move, testing the copy and checking it after the switch is what our WordPress migration service covers, for host moves and for sites coming over from Wix or Squarespace.
Which URLs should you list before you move?
Every one of them. The list is what you check the new site against, and you cannot rebuild it after the old host is gone.
The quickest start is your XML sitemap. On 18 Oct 2026 ours listed 48 posts and 17 pages, 65 addresses in all. That is the list we would test on the new host, page by page, before letting the domain point at it.
A sitemap misses things, though. Add the URLs that bring visits from search (Search Console, Performance, Pages), any address printed on flyers or in old emails, and image or PDF links other sites point to.
Do you need redirects to move a WordPress site to a new host?
Usually not. If the domain and the permalink setting stay the same, every page answers at the same address on the new server.
You need redirects when anything in the address changes. A new domain, a switch from /?p=123 to /post-name/, or slugs tidied up during the move all count. Google asks for server-side permanent redirects, 301 or 308, from each old URL straight to its new one, with no chains, and kept “for as long as possible, generally at least 1 year”.
If a permalink change already left you with 404s, our post on fixing WordPress 404 errors after a permalink change shows where those come from.
Why does a plain find and replace break WordPress?
Because WordPress stores many settings as serialized PHP, and serialized text records the length of every string. Change the text without changing the length and PHP refuses to read the whole setting.
We ran it again on 18 Oct 2026 with PHP 8.4.13. The option held two addresses, a logo link and a footer contact link, the way a theme saves them. Serialized, the first one read:
s:22:"https://old-host.test/"
A plain find and replace swapped in a 35-character domain and left the 22 in place:
s:22:"https://www.new-domain-example.com/"
Asked to read it back, PHP’s unserialize returned false. Not one broken link, the whole option. The footer link we had not looked at was gone with it.
A replace that understands serialized data rewrites the lengths instead. In our test it wrote 35 for the logo link and 46 for the footer link, and both came back intact:
s:35:"https://www.new-domain-example.com/"
s:46:"https://www.new-domain-example.com/contact-us/"
WP-CLI’s search-replace command does this; its documentation says it “intelligently handles PHP serialized data”. The search and replace plugins written for WordPress do the same. Raw SQL in phpMyAdmin does not.
A broken option rarely shows an error. The site loads, and a logo link, a menu setting or a page builder layout quietly falls back to a default. That is why we check the theme and plugin settings screens after the move as well as the pages.
How do you test the new host before the DNS switch?
Point only your own computer at the new server, then click through the site as a visitor would.
One way is a line in your computer’s hosts file that sends your domain to the new server’s IP address. Everyone else still reaches the old host, and you see the new copy at the real address, which is what WordPress expects.
Work through the URL list from before the move. Then test the things a page view does not show:
- Submit every form and confirm the email arrives.
- Place a test order or booking if the site takes them.
- Log in to wp-admin and open the theme and plugin settings.
- Check that the SSL certificate covers both the www and plain domain.
- Read Settings, Reading and confirm “Discourage search engines” is not ticked.
If the copy came from a staging site, that box may well be ticked, and it travels with the database. Our post on the discourage search engines setting shows what it does to a live site.
What should you watch in Search Console after the move?
Three reports, for the first few weeks.
Pages, under Indexing, shows whether the count of indexed pages holds steady or falls. Performance, filtered to the last 7 days, shows whether clicks and impressions dip and then recover. Sitemaps confirms Google has read the sitemap from the new server.
If the domain changed, file a Change of Address in Search Console from the old domain’s property, after the redirects are live. Google’s help page says the tool is for moves “from one domain or subdomain to another”. It is not for a move from http to https, and it does nothing for a host change on the same domain.
Is your host’s free migration enough?
Often it is, for a plain WordPress site that keeps its domain. The host copies the files and the database, and the URLs never change.
It is thin when the domain changes, when the site takes orders or bookings, or when the move comes with a new theme or new permalinks. A host’s migration tool copies the site. It does not usually test your forms, your checkout or your redirects for you.
We have been building and moving sites since 2017, over 300 projects in that time. The copy is the short part of a move. The checks after it are what keep the rankings.
Moving your WordPress site soon?
Tell us where the site is now and where it is going, and we will reply in writing with what the move involves and the checks we would run.
Not sure what state the site is in before the move? Send your address for the free site check, and a written reply comes within 2 business days.
Where did these facts come from?
- DistroCode test, PHP 8.4.13 CLI on our own Mac (18 Oct 2026), a two-value WordPress-style option serialized, then changed with a plain str_replace and with a length-aware replace, checked Oct 18, 2026
- Google Search Central, Site moves with URL changes (301 or 308 redirects, keep them at least 1 year, temporary ranking fluctuation, a few weeks for medium sites), checked Oct 18, 2026
- Search Console Help, Change of Address tool (domain moves only, not http to https; redirects for at least 180 days), checked Oct 18, 2026
- WP-CLI, wp search-replace ("intelligently handles PHP serialized data"), checked Oct 18, 2026
- distrocode.com post-sitemap.xml (48 URLs) and page-sitemap.xml (17 URLs), checked Oct 18, 2026
Questions and answers
Will moving my WordPress site to a new host hurt my Google rankings?
Not if the page addresses stay the same and the new server answers well. Google says rankings can move around for a while after any big change, and a medium-sized site can take a few weeks to settle when its URLs change.
Do I need redirects if I only change hosts and keep my domain?
Usually not, because every page keeps its address. You need them when the domain, the permalink structure or any page slug changes on the way.
Can I use a search and replace plugin or SQL to change the domain?
Not plain SQL. It leaves the length numbers inside serialized settings wrong, and PHP then cannot read the setting at all. WP-CLI's search-replace rewrites those lengths, and so do the replace tools built for WordPress.
How long should I keep redirects after a domain change?
Google's site move guide says at least a year, and longer is better. Its Change of Address help says at least 180 days, longer if Google still sends visits to the old URLs.
Is the free migration from my new host enough?
Often, for a plain WordPress site that keeps its domain. It is thin for a store, a site that takes bookings, or a move that changes the domain, because those need the checks in this post.
Rather hand this to us? See the WordPress maintenance plan Want to know if the problem stops here? Ask for the free site check.
We write up one real fix or build a few times a week on LinkedIn. Follow DistroCode there: linkedin.com/company/distrocode


