Migrating WordPress to Cloudflare Pages with AI

WordPress is powerful. For landing pages, portfolios, and company sites, it is often too heavy. You manage plugins, updates, and servers for content that only needs simple HTML.

I moved my site to Cloudflare Pages using Astro and AI. It cost zero dollars and runs faster.

Here is the process and what broke.

The Tech Stack • Static Site Generator: Astro • Hosting: Cloudflare Pages • Forms: FormRoute • AI Assistant: Claude

Why Cloudflare Pages? • Global edge network with no cold starts. • Generous free tier with unlimited bandwidth. • Easy integration if you use Cloudflare for DNS.

The Migration Steps

  1. Content Inventory I exported the WordPress XML file. I gave it to Claude to create a clean list of every post, slug, and category. This took 30 seconds instead of hours.

  2. Content Conversion WordPress uses HTML and shortcodes. Astro uses Markdown. I used Claude to convert the HTML to Markdown with proper frontmatter. It worked for 80% of my content.

  3. Automation I asked Claude to write a migration script. The script read the XML, created individual Markdown files, and updated image references.

What Broke (The 20%)

Static sites do not have a server. This means certain things stop working:

• Contact Forms: PHP-based forms like Contact Form 7 fail. I replaced them with FormRoute. You simply point your form action to their API. • Shortcodes: Gallery and plugin-specific shortcodes do not exist in Astro. You must rebuild these as components. • Search: WordPress search is server-side. I used Pagefind to add client-side search to my static site. • Comments: WordPress comments do not work on static sites. I removed them.

The Results

• Build time: Under 10 seconds. • Speed: Under 50ms globally. • Lighthouse score: 98–100. • Cost: $0. • Maintenance: Zero.

AI saved me days of work on content conversion and scripting. However, you still need to make the human decisions on what to keep and how to replace broken features.

Source: https://dev.to/edu_villao/how-i-migrated-a-wordpress-site-to-cloudflare-pages-using-ai-and-what-broke-eji

Optional learning community: https://t.me/GyaanSetuAi