> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webstorio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate WordPress with one AI prompt

> Paste one prompt into your AI agent — it runs the Webstorio WordPress migrator, publishes, and refines the site.

Leave WordPress with a **single prompt** in your AI agent. The agent runs the [WordPress migrator](https://docs.webstorio.com/guides/migrate-from-wordpress.md) via the CLI, pushes to Webstorio, seeds posts (and Woo products when available), then restyles the layout.

You need **Node.js**, a free [Webstorio account](https://webstorio.com), and an AI agent that can edit files and run terminal commands. Keep your WordPress site online for REST import, or have a WXR export ready (**Tools → Export**).

Prefer typing every CLI flag yourself? Use [Migrate from WordPress](https://docs.webstorio.com/guides/migrate-from-wordpress.md). Prefer building a new site from scratch? See [Your first site with AI agents](https://docs.webstorio.com/developer/your-first-site.md).

## What you'll end up with

* A local Webstorio CLI project with migrated pages, blog posts (`blog_post` CMS), media, and optional WooCommerce products
* `MIGRATION_REPORT.md` (permalink map) and `AGENTS.md` (refine instructions)
* A live URL like `https://your-site.webstor.io`
* A redesigned header/home — structural import first, then AI polish

## Step 1 — Open your AI agent

Open an empty folder (or any workspace) in your AI agent. You do not need a Webstorio project yet.

## Step 2 — Paste the prompt

Copy the prompt below into a **new chat**. It asks for your WordPress URL (or WXR path), then runs migrate → install → login → push → seed → refine.

```text theme={"dark"}
Migrate my WordPress site to Webstorio and publish it. Follow https://docs.webstorio.com/developer/migrate-wordpress-with-ai and https://docs.webstorio.com/guides/migrate-from-wordpress

1. Ask me in one short message for: (a) live WordPress URL and/or path to a WXR export XML, (b) desired site name + short unique subdomain, (c) optional WooCommerce REST key/secret if I have a store. Then proceed.
2. Run the migrator (omit flags I did not provide):
   npx @webstorio/cli@latest migrate wordpress --url <url> --from <wxr.xml> --out <subdomain> --name "<name>" --subdomain <subdomain> [--woo-key … --woo-secret …]
   If dry-run is useful first, run with --dry-run, show me the report summary, then run without --dry-run.
3. cd <subdomain> && npm install
4. Run npx webstorio login. Tell me to sign in / create a free Webstorio account and approve the CLI in the browser, then wait for me.
5. Run npx webstorio push --publish. If the subdomain is taken, pick another and retry.
6. Run npx webstorio seed
7. Refine the look using AGENTS.md in the project: restyle components/_header.tsx, components/_footer.tsx, and pages/home.tsx to feel on-brand. Keep blog_post field keys and product slugs stable. Do not invent a purple glow theme or dense card grids. Then push again with npx webstorio push --publish.
8. Reply with the live URL https://<subdomain>.webstor.io plus a short summary from MIGRATION_REPORT.md (page/post/product counts and any warnings).
```

## Step 3 — Answer the agent and approve login

Give your WordPress URL (for example `https://example.com`) or the path to your `.xml` export, plus the name/subdomain you want.

When the agent runs `npx webstorio login`, sign in and **approve** the CLI, then tell the agent to continue.

## Step 4 — Check the live site

Open the URL the agent returns. Posts live under CMS routes like `/content/blog_post/...`. Static pages keep their slugs. Review `MIGRATION_REPORT.md` for redirects when you cut over DNS.

## What gets migrated

| WordPress | Webstorio |
| - | - |
| Pages | React pages |
| Posts | CMS `blog_post` |
| Media | `assets/wp/` (when downloaded) |
| Menus | Structural header links |
| WooCommerce | Online Store (with REST keys) |

Themes, plugins, shortcodes, and WP users are not ported. The first pass is **structural**; step 7 of the prompt is the AI redesign.

## Tips

* Large media libraries take time — the CLI prints crawl and download progress.
* No public Woo API? Skip keys; products can be added later in the dashboard or via [MCP](https://docs.webstorio.com/developer/connect-mcp.md).
* After cutover, point your custom domain in Webstorio and add redirects from old permalinks.

## Related

* [Migrate from WordPress (CLI reference)](https://docs.webstorio.com/guides/migrate-from-wordpress.md)
* [Connect MCP](https://docs.webstorio.com/developer/connect-mcp.md)
* [Your first site with AI agents](https://docs.webstorio.com/developer/your-first-site.md)
* [CLI commands](https://docs.webstorio.com/cli/commands.md#webstorio-migrate-wordpress)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.