Rescuing an old website without turning it into a life project
A few days ago, I finally got around to something I’d been putting off since about 2012: cleaning up a mess on one of my old websites. One part is still plain HTML. Another runs on WordPress. And in the middle, for a few years, it ran on Mambo CMS, which means one layer of the site is frozen in a very specific moment of the PHP internet.
That middle layer was the reason I didn’t want to touch this site.
The obvious option was to do the boring thing: migrate everything to WordPress, unify the stack, review extensions, clean up the database assumptions, and come out the other side with something respectable by 2026 standards.
But I knew that was exactly how a two-hour project turns into a two-week one, with regressions all over the place. And for a site like this, with not that many visitors, the payoff just wasn’t there. That kind of purity can become its own form of vandalism.
I wanted something simpler: make the old HTML site findable by Google, get that Mambo slice running on PHP 8, make sure those three layers didn’t step on each other, and not break any permalinks.
I finally tackled this in 2026 thanks to my new AI superpowers.
I asked Codex to assess and fix the SEO issues in the legacy HTML part of the site. It took about 30 minutes. I’m pretty sure it would have taken dozens of hours to do by hand.
Mambo CMS was abandoned three or four PHP versions ago, maybe more, who knows. None of that part of the site worked. Not a single screen would load.
For the Mambo side, I could have tried to migrate the whole codebase to PHP 8. But that would have turned into a full migration of a messy old system, and I was almost certain I’d break working behavior just by touching the code.
So I went with a modest workaround. Instead of trying to modernize Mambo itself, I built a compatibility layer around the specific things that were breaking. Most of what broke brought back old memories of how ugly PHP used to be: mysql_*, ereg*, split(), each(), and the old magic quotes helpers.
The solution came down to three parts:
- A PHP 8 shim that restores a subset of legacy functions, mapping
mysql_*calls tomysqli_*and the regex pieces topreg_*. - A bootstrap include loaded early in the Mambo entry point, before the rest of the code gets a chance to explode.
- A tiny installer so the process can be repeated without manually patching files every time.
The important thing was to be clear about what this is not. It is not a migration, it does not make Mambo modern, doesn't solve every problem inside old plugins or third-party code, doesn't redeem years of technical debt. It just gives a dead Mambo installation enough support to serve content under PHP 8.
In the end, I spun that work off into a small open source project because this feels like a recurring problem, not a one-off. Somewhere out there, maybe someone else is looking for a way not to rebuild the whole house, just to get the windows to open again.
The code is here: danielpradilla/mambo-rescue