This is a submission for the Hacktoberfest Open-Source AI Challenge Week 4: Ghost in the Machine
What I Built
Every DĆa de los Muertos, families build an ofrenda: photos, marigolds, candles, the favourite food of someone who's gone. The point isn't to bring them back. It's to make sure they aren't forgotten.
The internet has its own dead, and most of them run on WordPress. A blog someone kept for ten years. A small business site. A club's event archive. Nobody logs in anymore, plugins stopped updating, PHP is three versions behind, and one day the hosting bill doesn't get paid and all of it is gone. Every old link turns into a 404.
So with my team at Hackers Hostel I worked on WP2Astro, a WordPress plugin that turns the site it's installed on into an Astro site, pushes it to GitHub and keeps it in sync. It's an ofrenda for a website: the words, the links and the look stay exactly where people remember them, but nothing on the server is left to rot.
-
Same URLs. Posts, pages, categories, tags, custom post types, paginated archives, and year, month and author archives keep their permalinks. Old links like
?p=123,?page_id=7,/feed/and changed slugs redirect to the right place. - Same look. The theme's CSS, images, fonts and scripts are copied, and an open model rebuilds the header, menu and footer as an Astro layout.
-
Old junk gets laid to rest. Shortcodes from plugins deleted years ago get cleaned up instead of showing up as
[vc_row]forever. - No terminal needed. Install the plugin, click Convert to Astro, get a repo or a zip.
Demo
š hackershostel.com/wp2astro
Code
HackersHostel
/
WP2Astro
Turn a WordPress site into a fast Astro site ā same URLs, same look ā push it to GitHub and keep it in sync. A WordPress plugin.
WP2Astro
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. It converts the site it runs on into an Astro 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).
Highlights
- Installs like any plugin. No Node.js, terminal or application passwords on your side: upload the zip, open WP2Astro, click Convert to Astro.
-
Same URLs. Every post, page, custom post type entry, category and tag keeps its permalink, and so do paginated
archives and year, month and author archives. Old links still work: changed slugs,
?p=123,?page_id=7?s=searchand/feed/redirect to the right place. - Same look. The theme'sā¦
How I Built It
The AI in WP2Astro is built for open-weight models running on your own machine.
The Local model option talks to anything with an OpenAI-compatible API: Ollama, LM Studio, llama.cpp or vLLM. Pull Gemma, point WP2Astro at your server (for Ollama, http://localhost:11434/v1), click Test, and your posts never leave your network. If you'd rather not host a model, OpenRouter works too, and its default there is also an open model, google/gemma-4-31b-it.
We kept the model's job small on purpose. It does two things:
- Rebuilds the Astro layout from the homepage's header, menu and footer (scripts and styles stripped first).
- Rewrites posts that contain dead shortcodes.
Every answer is validated before it's used: the layout must render the real menu and stylesheets from site data and can't contain scripts. If an answer fails, it gets one retry, then WP2Astro falls back to a clean default layout, or leaves the shortcode and lists it in CONVERSION_REPORT.md. A small open model can have a bad day and the site still builds. Answers are cached, so a sync only asks the model again when the theme, the menu or one of those posts changed.
Everything around the model is plain, boring PHP, the way WordPress likes it:
- Content becomes Markdown with frontmatter, with anything that only looks like Markdown escaped (
__init__stays__init__). - Work runs in short steps driven by the dashboard, WP-Cron or WP-CLI, so it fits cheap shared hosting.
- GitHub connects with the device flow. Each sync compares what WordPress generates, what's on GitHub and what was pushed last time, and commits only the difference. Files you edit in the repo are never overwritten.
- Media can stay in the repo, go to Git LFS, stay on WordPress, or go to S3, Cloudflare R2 or Bunny Storage.
- Generated files have no timestamps, so nothing changes unless the content did.
- Every repo ships with an agent kit (
AGENTS.md, skills) so a coding agent can finish whatever the conversion flagged.
Why Does Open Innovation Matter?
A memorial shouldn't depend on a subscription.
The sites we want to save are exactly the ones nobody is paying attention to anymore. If keeping them alive required renting a closed model forever, they'd die again the first time a card expired. With open weights, the whole stack is something you can own: a GPL plugin, Astro, Git, and a model on your own hardware. It costs nothing to run, it works on a laptop with no internet, and private drafts and posts never get sent to someone else's server.
Open models also made the design possible. Because WP2Astro checks every answer and has a fallback, it doesn't need a giant model. A modest Gemma running locally is enough, and that's what makes "run it yourself" a real option instead of a downgrade.
The Spirit of It
Ghosts are what's left when something is gone but not let go. A lot of the web is like that: half-alive WordPress installs nobody patches, still holding stories people care about.
WP2Astro is our way of letting them rest properly. WordPress can go offline, or stay backstage behind a login, and the site lives on as plain HTML with every old link still working. Same words, same look, nothing left running for anyone to break into. šÆļøš¼
Team
Built by the Hackers Hostel crew: @mahmudurrahmanlabib, @tahrimwalid and @mahedi.

Top comments (0)