The Ghost of PHP and Haunted WordPress Sites A developer at Hackers Hostel built WP2Astro, an open-source WordPress plugin that converts legacy WordPress sites into static Astro projects, using Google's open-weight Gemma 4 model to rebuild layouts and strip dead page-builder shortcodes. In a test run on a 2009-era blog, the tool converted 20 entries with 6 media files and preserved 27 old URLs as redirects, producing a layout that was valid on the first attempt in 10 seconds and a full conversion in about 30 seconds, with an Astro build of 33 pages in 0.7 seconds at a cost of a fraction of a cent. The plugin, released under GPL-2.0-or-later, can also run without AI to produce a working static site. This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine https://dev.to/challenges/hacktoberfest-week4-2026-10-26 Nothing has died more times on the internet than PHP. At this point, PHP has practically become a ghost. Declared dead countless times, yet somehow still haunting the majority of the web with vulnerabilities like PHP2Shell CVE-2026-109618 and CVE-2026-109619 . Even though PHP powers much of the internet, developers are increasingly moving away from old, haunted WordPress sites. Websites abandoned years ago are still wandering around the internet, running outdated PHP versions, broken plugins, forgotten themes, and shortcodes from page builders that died a decade ago. Some of these sites haven't seen a developer since 2009. Their owners have disappeared, their plugins have stopped working, and their servers are one PHP update away from sending them to the grave. But the content? The stories, the photographs, the memories? Those deserve to live. Thus comes WP2Astro to the rescue. Powered by Google's open-weight Gemma 4 , WP2Astro takes these haunted WordPress sites and gives them a second life as modern, static Astro https://astro.build websites. No more PHP runtime. No more abandoned plugins. No more worrying about whether the next update will finally kill the site. The ghosts of WordPress's past can finally rest, while everything worth remembering lives on. Ironically, WP2Astro is a WordPress plugin You install it on the old site, click Convert , and here is what happens: ?p=123 , ?s=search and /feed/ all find their way to the right page. The old site is not destroyed. It is remembered. Same words, same look, same addresses, in a form that no longer needs a PHP server to stay alive. Meet the Ghost Town Gazette , a haunted local news blog from 2009 to 2013, still dressed in the Twenty Ten theme. Fifteen posts, three pages, two custom "project" entries, Yoast SEO titles, a post that changed its name, and one cursed entry called "Visual Composer Was Here" . Before. WordPress, 2009: After. Astro, layout rebuilt by Gemma 4: Same header photo. Same menu. Same typography. The sidebar is gone on purpose. Its widgets search, recent posts, recent comments were live WordPress features, and the static site gets its own Pagefind search instead. Now the haunted post. On WordPress, the dead page builder bleeds right through: After Gemma's exorcism: vc row vc column width="1/2" is gone. The button became a normal link. The dead contact-form-7 was laid to rest. The words around them were not touched. Numbers from the real run Gemma 4 26B A4B through OpenRouter, on my laptop : | Entries converted | 20 with 6 media files, and 27 old URLs kept as redirects | | Layout | valid on the first attempt, in 10 s | | Whole conversion | about 30 s | | Astro build | 33 pages in 0.7 s, 20 indexed for search | | AI cost | a fraction of a cent | Try it yourself. Download wp2astro.zip from the latest release https://github.com/HackersHostel/WP2Astro/releases/latest , upload it under Plugins → Add New , and open WP2Astro in the admin menu. You don't need any account to test it. Pick No AI and you still get a working site, or run it from the command line: wp wp2astro convert --no-github --zip=./my-site.zip Turn a WordPress site into a fast Astro site — same URLs, same look — push it to GitHub, and keep it in sync. WP2Astro is a WordPress plugin by Hackers Hostel https://hackershostel.com . It converts the site it runs on into an Astro https://astro.build project, pushes it to a GitHub repository and keeps that repository up to date as you publish. You keep writing in WordPress; your visitors get a static site. Free and open source GPL-2.0-or-later . ?page id=7 GPL-2.0-or-later. PHP 8.0+, WordPress 6.5+, and no Composer dependencies. Everything happens inside WordPress. Each post is rendered through the content , so shortcodes and blocks from plugins that are still alive come out as real HTML. Only the dead ones survive as plain text, and those are exactly the ones that get flagged. The HTML is then turned into Markdown. Tables, iframes and other awkward elements stay as raw HTML, so nothing gets lost along the way. Old URLs are sacred. The redirect map is the part most migrations skip and later regret. How to Migrate Off WordPress Without Losing SEO https://dev.to/techpotions/how-to-migrate-off-wordpress-without-losing-seo-ep8 by techpotions makes that case well. So WP2Astro builds the map automatically from WordPress's own records: old slugs, ?p= and ?page id= links, ?s= searches and feed URLs. npm start answers them with real 301s, and Netlify or Cloudflare Pages read the same rules from public/ redirects . Long work, short steps. A conversion is a job split into phases: content, media, AI layout, cleanup, packaging and GitHub. Each step stays under PHP's time limit. The same runner is driven by the admin button, by WP-Cron for auto-sync after you publish, and by WP-CLI. Gemma is the medium, not the oracle. There is no agent loop. Every AI job is a single prompt with strict rules and a validator watching over it: site.json . It must render the stylesheets and the menu from data, contain a