Turns Out · · 14 min read
Legacy website: rescue, refactor or rebuild? A decision framework with effort multiples
A 10-question score for deciding whether a legacy website needs a rescue, a refactor or a rebuild, with the six signs of technical debt and effort multiples.
The message usually arrives on a Friday. The legacy website is slow, a form broke after a plugin update, the developer who built it has moved on, and the hosting company just emailed about a PHP version nobody recognizes. The question is always the same: do we start over?
We get asked this often enough that we stopped answering from instinct. Instinct says rebuild, because a rebuild is a clean story and a legacy website is a messy one. But a rewrite throws away the one thing legacy code has that new code does not, which Joel Spolsky put plainly 26 years ago. So here is the scoring method we run before we say anything, the six signs of technical debt and which one actually forces a rebuild, and the effort multiples you can hold a quote against.
“Old code has been used. It has been tested.”
The six signs of a legacy website, and which one matters
Every “is this site dead?” conversation touches the same six symptoms, so here they are with the numbers attached.
- An unsupported runtime or abandoned dependencies — PHP 8.1 reached end of life on 31 December 2025, 8.0 in November 2023 and 7.4 in November 2022, yet as of November 2026 W3Techs still counts 24% of PHP sites on PHP 7 and about 7% on PHP 5. PHP 8.2 gets security fixes only until 31 December 2026. Node 18 ended in April 2025, Node 20 on 30 April 2026. Dependencies rot the same way: Patchstack logged 11,334 new vulnerabilities in the WordPress ecosystem in 2025, 91% of them in plugins, and 46% had no fix from the developer at the moment of public disclosure. For the most heavily exploited ones, Patchstack's weighted median time to first exploit was 5 hours. An abandoned plugin is a vulnerability with a release date you do not know yet. One in a critical role (forms, payments, search) turns days into weeks; it is still not a rebuild.
- No tests — not “few tests”. Zero. Every change is verified by someone clicking around, which means most changes are not verified.
- Hard-coded credentials — database passwords, API keys and SMTP logins in the repository or in a template. Rotating one means a deploy; a leaked repository means everything.
- No staging — changes go from a laptop to production; nobody can rehearse an upgrade, so nobody runs one.
- One-person knowledge — the only person who understands the deploy has left, or is one resignation away.
- An abandoned platform — the CMS or framework underneath is no longer maintained and has no supported path forward: a theme framework whose author vanished in 2019, or a custom PHP framework written by the original agency. An out-of-support version of a living platform is the milder case. Craft CMS 3 left security support on 30 April 2024 and Craft CMS 4 on 30 April 2026, but both have a documented upgrade path, so on their own they call for an upgrade, not a rebuild (a Craft CMS 6 readiness check tells you where a Craft CMS site stands).
The first five are operations debt (ops debt from here on). Upgrading PHP from one 8.x release to the next, replacing an abandoned plugin with a maintained one or 40 lines of code, adding a test harness around the 10 paths that matter, moving secrets to environment variables, standing up a staging server, writing the runbook (the one-page document that says how to deploy, roll back and restore): on the client sites we audit, each of these is usually measured in days. The exception is a jump from PHP 5 or 7 on custom code, where functions were removed outright; budget weeks for that one. None of them requires a new codebase, and a new codebase does not automatically give you any of them: we have seen fresh rebuilds shipped with no tests, no staging and the API key in config.php.
The sixth is different. When the platform underneath is no longer maintained, you cannot buy your way back to supported with a week of work. A site on a theme framework whose author stopped shipping in 2019, or on an agency’s private PHP framework, has no version to upgrade to: every security fix is yours to write, for as long as the site lives. That is platform debt, and platform debt is what rebuilds are for.
The 10-question score
Score each question from 0 to 3; the 0 and 3 anchors are below, 1 and 2 are “mostly fine” and “mostly not”. It takes 20 minutes with the developer who last touched the site, or a code audit if that person is gone (our free website audit, offered to medium and enterprise-grade businesses, covers the runtime, dependency and performance questions).
- Runtime support — 0: a current PHP release or Node LTS (long-term support) line. 3: a version past end of life, or a hosting plan that cannot offer a supported one.
- Platform support — 0: CMS or framework in active development with a documented upgrade path. 3: end of life with no path, or a bespoke framework nobody outside the original agency has seen.
- Dependency health — 0:
composer outdatedornpm outdatedis short and boring, andcomposer auditis clean. 3: abandoned packages in critical roles (forms, auth, payments, search). - Tests and verification — 0: automated tests on the paths that make money. 3: none, and no written manual checklist either.
- Deploy path — 0: one command or one merge, repeatable, with rollback and a backup someone has actually restored. 3: FTP, a manual database step, or “ask the one person who knows”.
- Environments — 0: local, staging and production that match. 3: production only.
- Secrets and access — 0: secrets in environment variables, access per person, rotation possible. 3: credentials in the repository and one shared admin login.
- Data model fit — 0: the content structure still describes the business. 3: editors keep the real site in spreadsheets because the CMS cannot hold it.
- Performance ceiling — 0: passes the Core Web Vitals thresholds in field data, or can with caching. 3: fails them for architectural reasons (synchronous third-party calls on every request, a page builder that emits 2 MB of HTML).
- Knowledge — 0: more than one person can deploy and debug, and it is written down. 3: one person, nothing written.
Add it up.
- 0–10: rescue — the site is structurally sound and operationally neglected. Fix the ops debt, keep the code.
- 11–20: refactor — keep the platform, replace the worst parts one at a time while the site keeps running.
- 21–30: rebuild — the platform has to change, or the data model has to change and the platform cannot be bent to it. Plan a migration.
Four rules sit on top of the total. If platform support scores 3, the job is in the rebuild band whatever the rest says, because there is nothing to upgrade to. If data model fit scores 3 and the platform cannot be bent to the new model, it is a rebuild too, even on a platform that is alive and well. That one is not debt; the business has outgrown the model. If platform support and data model fit both score 0 or 1, the ceiling is refactor however high the total: a 21 made entirely of ops debt is a long rescue, not a rebuild. And if deploy path scores 3, do that first, before any other work and before deciding anything else. Only two things come ahead of it, even if they have to be done by hand: rotating inherited credentials and proving a backup restores. Nothing on this list can be done safely on a site you cannot deploy twice in a row with the same result.
What each path actually involves
The words get used loosely in proposals, so here is what we mean.
- Rescue — a website rescue keeps the code. It starts on day one with every inherited credential rotated and a backup restore-tested. Then one scripted deploy path, staging, a smoke-test suite around the money paths, the runtime upgrade, dependency replacement, secrets moved out of the repository, and caching with a CDN (a content delivery network that serves cached pages from servers near the visitor) in front. Usually two to six weeks of calendar time, mostly in small, reversible steps. You keep every URL, every template and all of the SEO you have. On a WordPress or WooCommerce site, this is where our WordPress & WooCommerce service starts.
- Refactor — the platform stays, parts of the code go. The safest way to deliver it is Martin Fowler’s strangler fig: build the replacement for one piece beside the old one, route traffic to it, delete the old piece, repeat. A checkout, a search, a page-builder module at a time. Months, not weeks, but the site never goes dark.
- Rebuild — new platform, migrated content, new templates, a redirect map for every URL that ever ranked. Where the routing allows, deliver it the same way, in strangler-fig slices with the old site still running; a single cutover is the fallback, not the plan. The code is the smallest part; content migration, the redirect map and parity testing against the old site are where rebuilds overrun and where SEO is lost. If the move is from WordPress, our Craft CMS vs WordPress comparison covers what that migration involves.
A refactor pays down code debt, a rebuild pays down platform debt. Pick the one that matches the debt you have.
Before any of it, the 10-minute version of the audit answers the runtime, dependency and secrets questions:
# On the server, in the site root
php -v
composer outdated --direct; composer audit # Composer 2.4+ projects
wp core version; wp plugin list --update=available # WordPress
node -v && npm outdated
grep -rIniE "(password|passwd|secret|api_?key|token)['\"]?[[:space:]]*(=>|=|:|,)[[:space:]]*['\"][^'\"]+" \
--exclude-dir=vendor --exclude-dir=node_modules --exclude-dir=.git \
--exclude-dir=wp-admin --exclude-dir=wp-includes \
--exclude='*.min.*' --exclude='*.example' . | cut -c1-200
git ls-files 2>/dev/null | grep -E '(^|/)\.env$' # a committed .envA clean result is not proof. The search finds the obvious credentials, not the clever ones, and a short outdated list says nothing about the packages missing from it: an abandoned package has no newer version to be behind, which is what composer audit is there to flag.
Cost as effort multiples, not quotes
We do not publish dollar figures here, because a legacy website in Odesa, Ontario and Oslo costs different money to fix and one number would mislead two of the three. What transfers is the ratio of effort between the paths. Treat the multiples below as our rule of thumb for orientation, not a survey and not a quote. They compare the three paths for the same site.
- Rescue = 1× — the baseline: whatever a rescue of your site would take.
- Refactor = 3–6× a rescue — the spread depends on how many strangler-fig slices there are and whether a data-model change is hiding inside one of them.
- Rebuild = 8–15× a rescue — the top of the range is almost always content migration and redirect work.
Two outside surveys show what carrying the debt costs. The 50 CIOs McKinsey surveyed in 2020, all at companies with more than $1 billion in revenue, put technical debt at 20–40% of the value of their technology estate, with 10–20% of the new-product budget diverted to deal with it. Stripe’s 2018 developer survey found the average developer spends 13.5 hours a week on technical debt and more than 17 hours on maintenance overall. For a company with one web developer, that interest is roughly a third of a year, about 17 weeks of work. If a rescue of two to six weeks removed all of that interest, it would pay for itself in six weeks to four months at best; a 12× rebuild buying the same relief takes 12 times as long to pay back.
Three sites, three different answers
A rescue first. A medium-size WooCommerce store came to us with failing payments, a slow checkout and a rebuild quote from elsewhere. The audit found 55 active plugins and another 32 disabled ones still on the server. The report’s verdict, from the anonymized example on our free website audit page: “A full rebuild is not necessary. The core technology stack is solid. The problems are not architectural — they are accumulated plugin bloat, missing configuration, and deferred maintenance.” Every one of those is ops debt.
Atlas Network is the refactor. The deploy question was the high one: updates took hours to ship. We re-engineered the build pipeline and refactored the front end without a rewrite; updates now deploy in minutes rather than hours, and the content migration into the streamlined CMS structure finished without data loss. The same engagement shipped a UI refresh: a redesign without a rewrite.
ArchLynk is the rebuild. Three legacy brands, each with its own WordPress site, had to become one without losing the rankings any of them held. In the terms of this score, the data-model question was the high one: three content structures had to become one, and refactoring any single site would not get there. So it was a migration onto one Craft CMS content model, with the redirect work — server-level redirects and the retirement of the legacy domains — treated as a main deliverable. WordPress was not abandoned; this is the other way into a rebuild, the data-model rule.
What we advise against
- A rebuild disguised as a redesign — a new look does not require a new platform. If the score says rescue, buy the redesign on the platform you have, at a fraction of the cost and time.
- A big-bang cutover — if the plan has a weekend where the old site goes down and the new one comes up, the plan is missing a strangler-fig phase. Dual-run, move traffic in slices, keep the old site warm for a month.
- Rebuilding before the redirect map exists — the redirect map is a deliverable with its own sign-off, produced from a crawl of the live site and the analytics before the first template is written. The rebuilds we have seen lose rankings skipped it.
- Rewriting into the new developer’s favorite framework — a platform change should be justified by the platform score, not by who is available this quarter; otherwise it is the same one-person problem with a newer logo.
- Calling a firewall a rescue — a WAF (web application firewall) in front of a site on PHP 7.4 with an abandoned forms plugin buys time, not safety. It belongs in week one of a rescue, not instead of one.
- Scoring from memory — run the questions on the actual server. “Do we have staging?” is often “yes” until someone tries to log in.
Questions owners ask
Is an unsupported PHP version an emergency?
It is an unpatched attack surface, so treat it as the first ticket. From 8.1 to a current release it is usually a handful of deprecations, found in an afternoon on staging. From 7.x or 5.x on custom code it is removed functions and breaking changes: budget weeks, and expect refactor-band effort even when the total says rescue. The emergency is when the hosting plan cannot offer a supported version at all; that is a hosting move, inside the rescue scope.
Can we refactor without freezing content and marketing?
Yes, and that is the point of the strangler-fig approach. Each slice is built beside the live site and switched over on its own, so editors keep publishing and campaigns keep running. The only freeze is on the module being swapped, for the hours it takes to switch and verify.
How long does a rescue take?
For a site in the rescue band, usually two to six weeks. Day one: credentials rotated and a backup restore-tested. Week one: the deploy pipeline, staging and smoke tests on the money paths. Week two: the runtime and dependency work. Then caching. Longer than six weeks usually means a refactor-band problem was hiding in the score.
If you want the score run by someone who does this every week, our DevOps and code rescue service starts with exactly this audit, from the inside. The report says which band your site is in, including when it needs less than you feared.