A WordPress site that moves to Astro gets a new foundation. The design can stay the same. What has to come along is everything Google and your visitors already know: the pages, the URLs, the forms that send mail.
This is the order I do it in. What it costs is in what does it cost to move from WordPress to Astro?
1. List every URL
Before I build anything, I make a list of every URL the site has. Not just the pages in the menu. I take them from four places:
- The XML sitemap that WordPress generates.
- Search Console: every page that got impressions in the past year.
- Analytics: pages that still get visitors.
- Links from other sites to yours.
You’ll always find things nobody remembers. A campaign page from 2021. Tag archives. A PDF someone else links to. Every URL on the list later gets a new address or a decision that it can go.
2. Count the templates
Then I look at which kinds of pages there are. Blog posts, services, cases, jobs, a contact page. Each kind gets a template in Astro and a content type with its own fields.
A blog post is simple: title, date, image, text. A job has a location, hours and a closing date. I decide that per type, before I move any content.
3. Choose where you edit
You can edit content in a CMS like Sanity , or as Markdown files in the site itself, like on this site. Is there an editor who works in WordPress every week? Then I choose Sanity. They get fields that fit the content and a preview of the real page.
4. Move the content with a script
I don’t copy pages by hand. A script pulls the content out of WordPress and puts it in the new fields. Posts, pages, categories, authors, and with WPML or Polylang also the link between a page and its translation.
Was the site made with the regular WordPress editor? Then that’s fairly clean. With Elementor, Divi or WPBakery the text sits between shortcodes and settings. The script pulls the text out of that. Pages that really stand apart I rebuild by hand.
I run the script again until the output is right. That’s the advantage of a script: if something is wrong, I fix the script, not five hundred pages.
5. Images
Images go along as originals. I put them in storage on Cloudflare (R2). Cloudflare makes the size a visitor needs at the edge of the network, in AVIF or WebP when the browser supports it. Image optimisation plugins are no longer needed.
The script also rewrites the image links in the text. An old link to /wp-content/uploads/ that’s still in a post is a 404 waiting to happen.
6. Rebuild what plugins did
Go through the plugin list and you’ll see that half of it is no longer needed. Caching, security, image compression and SEO plugins come with the new setup.
What’s left actually does something: a contact form, search, a newsletter signup. I build those as a small function on Cloudflare, next to the site. A form is done quickly. Logins and member areas are a project of their own.
7. Redirects
Now the list from step 1 comes back. Every old URL gets a permanent redirect (301) to its new address. Most of them come from the script, because it knows which old page belongs to which new one. The rest I map by hand.
Two rules:
- One hop. An old URL goes straight to the final address, not via a redirect that redirects again.
- Not everything to the homepage. A page without a new counterpart goes to the closest page that answers the same question. Google treats a redirect to an unrelated page as a soft 404.
On Cloudflare the redirects are a plain text file in the project. You can read them, and they go along with every deploy.
8. Titles, descriptions and the sitemap
Every page keeps its SEO title and meta description. If the site uses Yoast or Rank Math, the script takes them along with the content. Canonical tags, hreflang for multiple languages and a new XML sitemap come from the templates. Then I compare the old and the new site page by page on a test address before the switch.
9. Launch
The launch itself is small. The domain points to Cloudflare, the new site is live within minutes. I submit the new sitemap in Search Console and ping Bing and other search engines through IndexNow.
10. Watch Search Console
After the launch I keep an eye on Search Console for a few weeks. Which URLs give a 404? Which pages drop out of the index? Do the positions of the most important pages hold? A forgotten URL usually shows up in the first two weeks. I fix it with an extra line in the redirects file.
When it’s done
A site that has moved well looks the same to Google as before, only faster. Your editors work in a CMS that only deals with content, and nobody has to install updates every week.
Do you have a WordPress site that’s due for this? On the WordPress migration page you’ll find how I approach a project and what I need from you to give a price.