Free Astro tutorials for complete beginners.

Beginner's Guide to Astro

How to Move a WordPress Site to Astro

Three ways to move from WordPress to Astro, from keeping WordPress as your editor to exporting everything to Markdown files.

Cover image for How to Move a WordPress Site to Astro
In this guide
  1. First, pick a route
  2. Route 1: Keep WordPress as a headless CMS
  3. Route 2: Export your content to Markdown
  4. Route 3: Rebuild from scratch
  5. Keep your addresses
  6. Go live
  7. Frequently asked questions

Moving from WordPress to Astro usually means a faster site and cheaper hosting. It also means giving up the WordPress dashboard, unless you choose one of the options below that keeps it. Here’s how to decide, and how to do it.

First, pick a route

There are three ways to make the move, from least to most change:

Route What changes Best for
Keep WordPress as the editor Astro displays your content, WordPress stores it Teams who need the dashboard
Export to Markdown Content becomes files, WordPress goes away Blogs and personal sites
Rebuild from scratch Everything is new Small sites, or a fresh start

There’s also a fourth option: EmDash, a CMS built on Astro that can import a WordPress site. See how to move from WordPress to EmDash.

Route 1: Keep WordPress as a headless CMS

WordPress has a built-in API that hands out your content as data. An Astro site can read that data and build pages from it. Your writers keep logging in to WordPress, and visitors see a fast Astro site.

This is the most technical route, because you write the code that fetches and displays the content. The Astro docs have a WordPress guide with the details.

Route 2: Export your content to Markdown

This is the route most personal sites take.

  1. In WordPress, go to Tools, then Export, and download your content as an XML file.
  2. Convert it to Markdown. The Astro docs recommend wordpress-export-to-markdown, a free tool that runs in your terminal. We haven’t run it ourselves, so follow its own instructions.
  3. Create a new Astro project from the blog template:
npm create astro@latest my-blog -- --template blog
  1. Copy your Markdown files into the project’s content folder, and check that each one has the fields the template expects, such as a title and date.
  2. Copy your images into the project and fix any image paths.

Large sites with complicated posts usually need some hand editing after the conversion.

Route 3: Rebuild from scratch

For a five-page business site, it’s often quicker to copy the text by hand into a new Astro project. Our free course takes you from an empty folder to a live site.

Keep your addresses

Whichever route you take, make a list of your page addresses first. Then either:

  • Keep them exactly the same in Astro. A WordPress post at /my-post/ becomes a file at src/pages/my-post.astro, or a blog post with that slug.
  • Or set up redirects from the old addresses to the new ones. Each host has its own way to do this.

This is the step that protects your search rankings.

Go live

Deploy the Astro site to a new host, test it at its temporary address, and only then point your domain at it. We recommend Cloudflare Workers, and we compare the alternatives in the best hosting for Astro.

Keep your WordPress site running for a few weeks afterwards, in case you need to check something.

Frequently asked questions

Will I lose my search rankings?

Not if you keep the same page addresses, or redirect old ones to new ones. Make a list of your current addresses before you start.

Can non-technical people still edit the site after the move?

Only if you keep a CMS. Plain Astro means editing files. If editors need a dashboard, consider keeping WordPress as a headless CMS, or look at EmDash.

Stuck on a step?

Check the common errors guide, look up a word in the glossary, or ask in the official Astro Discord, where the support channels are friendly to beginners.

Keep reading

  1. How to Deploy an Astro Site to Cloudflare Workers

    Put your Astro site online with Cloudflare Workers in four steps. This is how AstroBeginner itself is hosted, so every step has been run for real.

    Tutorials, 7 minute read, November 6, 2026

  2. How to Add Tailwind CSS to Astro

    Add Tailwind CSS to an Astro site with one command, then style your first element. Tested on Astro 7.4 and Tailwind 4.

    Tutorials, 5 minute read, November 6, 2026

  3. How to Add Images to an Astro Site

    Add an image to your Astro site, and let Astro shrink and convert it automatically. One test image went from 62 kB to 5 kB.

    Tutorials, 6 minute read, November 6, 2026

Try "blog", "deploy" or "EmDash".