r/Wordpress • u/Alarmed-Paint-791 • 16m ago
I retired 18 legacy WordPress installations without losing the websites, and open-sourced the tool
(Posted with prior approval from the moderators.)
- Project Name: wp-static-archive
- Repo/Website Link: https://github.com/ulfben/wp-static-archive
- License: MIT
- Description: Retire WordPress without losing your website. Build reproducible, verifiable static HTML archives, repair legacy content and preserve original URLs.
I teach game development at a university in Sweden, and we've been publishing annual websites documenting student games, conferences and exhibitions since 2008.
Nobody edits these sites anymore, but they contain nearly two decades of history. Keeping 18 WordPress installations, databases, themes and abandoned plugins alive indefinitely seemed like a rather silly way of serving what is essentially static content.
So I built wp-static-archive, a command-line tool for retiring WordPress without retiring the website.
It's is deliberately designed to be operated with the assistance of coding agents. Every old website has its own peculiarities, and archiving one is an iterative process of building, inspecting, identifying problems and applying fixes. The tool provides structured reports, reproducible builds, per-site fix lists and private candidates, allowing an agent to do much of the tedious investigative and corrective work while leaving final review and deployment to the human administrator.
It's a bit more ambitious than simply running wget:
- Archives published WordPress content, comments and media, preserving original URLs and permalinks.
- Handles password-protected posts and pages, either excluding them from the archive or preserving access restrictions through HTTP authentication.
- Preserves redirects and supports legacy query-string URLs.
- Repairs broken links and replaces obsolete web technologies, including Flash players, gallery plugins and broken embeds.
- Inventories archived files and flags potentially sensitive files, such as database dumps and backups, for review.
- Compares the archive against the original WordPress installation to catch missing pages, text, comments and files.
- Supports reproducible, site-specific fixes rather than manual edits to the generated HTML.
- Builds private candidates that you can inspect before publishing, with automated nginx deployment and rollback.
- Optionally submits the archives to the Wayback Machine.
What had already broken
The most horrifying part was discovering how much of the original web had stopped working long ago. Venue maps were blank, fonts had stopped loading, Flash videos were unplayable, and pages were still trying to contact services that ceased to exist years ago.
Rather than faithfully preserving broken functionality, the tool lets you restore functionality using simpler, more sustainable alternatives.
Flash became native HTML video (including transcoding FLV to MP4!), broken Google Maps became OpenStreetMap embeds, fonts were made local, and obsolete gallery plugins were replaced with a small built-in photo viewer.
Some numbers from the 18 sites:
- Combined front-page code and markup: 11.5 MB → under 3 MB.
- Front-page JavaScript files: 216 → 19.
- Across all 818 archived pages, only 10 still need jQuery.
- No archived page loads JavaScript from another site.
In many cases, the replacement wasn't just smaller and more self-contained. It was the first version of the feature that had actually worked in years.
You can browse the actual results here:



All served as static files, at their original addresses, without PHP or WordPress handling requests.
Deployment
The tool runs directly on your Linux server and requires shell access to the original WordPress installation. No containers, persistent services or additional web applications to maintain. Building works independently of the web server; automated deployment currently targets nginx.
The README covers installation and usage, and there's a detailed walkthrough of the entire archival process.
It's already running in production on our 18 sites, but it's early days as an open-source project. I fully expect every new site to require its own set of fixes. What I'm interested in is how effectively the current design accommodates those differences, and how much effort it takes to archive a site I've never encountered before.
If you're sitting on an old WordPress installation that you'd rather not maintain for another decade, I'd be interested in hearing from you.
AI Involvement: The tool was developed with extensive assistance from coding agents, guided by human architectural decisions, code reviews, automated tests and regression testing against the 18 production sites. Agent-assisted operation is also an intentional design feature of the tool itself. ChatGPT helped draft this post.