“We were told our PHP version is outdated, but we don’t know whether to rebuild.” “We can’t reach the company that built it, and there are no specs.” We are hearing more and more questions like these about websites and business systems built with PHP. In October 2026, serious vulnerabilities were found in PHP itself (CVE-2026-109618 / CVE-2026-109619), and fixes were released only for PHP 8.2 and later. Continuing to run old PHP is no longer something you can simply “wait and see” on. This article explains, from a developer’s perspective, how to decide whether to replace (rebuild) a PHP system, how the four approaches differ, and what changes when you use generative AI.
Three risks of staying on old PHP
1. Vulnerabilities are found but never fixed
Each PHP version has a fixed support period. Once that period ends, no fixes are provided even when vulnerabilities are found. Here is the support status as of October 2026 (official PHP supported versions).
| Version | Status (as of October 2026) | End of security fixes |
|---|---|---|
| PHP 8.1 and earlier (including 5.x and 7.x) | End of life | Already ended. No fixes are provided |
| PHP 8.2 | Security fixes only | December 31, 2026 |
| PHP 8.3 | Security fixes only | December 31, 2027 |
| PHP 8.4 | Active support | December 31, 2028 |
| PHP 8.5 | Active support | December 31, 2029 |
Security fixes for PHP 8.2 also end in about two months. If your system currently runs on PHP 8.2 or earlier, assume you will need to act soon.
2. One day it stops running on the server
Shared hosting and cloud providers phase out old PHP versions one by one. After the cutoff date, your site may start showing errors even though you changed nothing. Programs (libraries) provided by external services such as payments, loyalty points and shipping may also drop support for anything but newer PHP, causing confusing failures like “the pages load, but only payments fail.”
3. The people who built it are gone, and no one can fix it
The longer a PHP system has been in use, the more likely it is that the people who know its specs have left, through staff turnover or a web agency closing its doors. Without specs, and with code that has grown complex through patch after patch, every small fix breaks something else and quotes for changes keep rising.
Rebuild or keep running: how to decide
Not every old system needs to be rebuilt right away. Check where you stand from three angles: risk, maintainability and cost. The more of the following items apply, the more urgent a replacement is.
- It runs on PHP 8.1 or earlier (or you don’t know which version)
- It handles personal information or payments, or people outside the company use it
- Support has ended for the framework it uses (CakePHP 2, FuelPHP, older Laravel, etc.)
- There are no specs, or they don’t match how the system actually behaves
- No one on staff understands how the system works inside
- Even small fixes sometimes break something else
- Annual maintenance and modification costs keep rising
On the other hand, for a small internal tool that handles low-sensitivity information and has well-organized code, a PHP version upgrade plus partial fixes may be enough.
Four approaches to replacement
“Rebuilding” can mean one of four broad approaches. Choose based on the state of the system and how long it can be taken offline.
| Approach | What it involves | Best when | Watch out for |
|---|---|---|---|
| PHP version upgrade | Keep the code and fix it so it runs on a newer PHP | The code is fairly clean and the framework is recent | Outdated design and vulnerable coding patterns remain. It may not solve the root problem |
| Partial modification | Rewrite only the most problematic parts | Problems are concentrated in one area | Repeated rounds can end up costing more than a rebuild |
| Phased rebuild | Build a new system alongside the old one and switch over screen by screen or feature by feature | Business systems that can’t be stopped, large websites | Set operating rules for the period when old and new run in parallel |
| All-at-once rebuild | Build a new system and switch everything over on a single day | The system is small and can be stopped briefly | Problems pile up on cutover day. A rollback procedure is essential |
For systems that can’t be stopped, the third option, a phased rebuild, keeps risk lowest. You run old and new in parallel and route each URL or feature to the new side in turn, so each switchover only requires checking a small scope.
How generative AI changes PHP replacement
The biggest reason replacements have been expensive and slow is the work of figuring out “what the current system actually does” by having people read the code. Generative AI dramatically shortens this step. We use vibe coding, in which engineers write code in dialogue with AI, every day, and built this very website through conversation with AI alone. In a replacement, we use AI in the following four steps.
1. Recover the specs from the code
We have AI read the PHP files and database structure and list “which screen takes what input, which data changes, and which external services it talks to.” Even with tens of thousands of lines of code, you get the full picture quickly, and people can focus on checking whether that list matches the actual business.
Summarize what the following PHP file does.
– Organize it into a table with five parts: “screens,” “inputs received,” “database reads/writes (table and column names),” “external communication,” and “behavior on error”
– Do not guess anything that can’t be determined from the code; write “Unknown (needs checking)” instead
– List any security problems (SQL injection, missing input validation, etc.) separately
—
(Paste the contents of the PHP file here)
The key is the instruction “don’t guess; write Unknown.” AI can produce plausible-sounding explanations (hallucination), so make the unknowns explicit and have a person verify them.
2. Rewrite the same behavior in a new environment
Based on the recovered specs, we rewrite the same behavior in the latest PHP (Laravel, etc.). AI builds routine parts such as screens and data entry and search in minutes. Engineers can spend their time on the parts that need judgment: organizing the design, security and performance.
3. Generate old-vs-new comparison tests automatically
The scariest outcome of a replacement is “it doesn’t behave like before.” We use AI to prepare large numbers of tests that feed the same input to the old and new systems and check that the results match. This covers far more ground than people checking by hand.
4. People review and decide
Code written by AI is always reviewed by an engineer before it is used. Decisions such as how to preserve business rules, how to migrate data and when to switch over are people’s work. We never pass your personal information or confidential data to AI.
How a replacement proceeds (6 steps)
- Assess the current system: review the code, database and server environment, recover the specs with AI, and identify high-risk areas
- Propose new screens: build the main screens so they run in the new environment, check them, and decide what to keep, change and drop
- Migration plan and quote: decide the switchover order, data migration method, schedule and cost
- Development and comparison testing: develop while confirming that old and new produce the same results
- Data migration and switchover: rehearse in a staging environment, then migrate production data and switch over feature by feature
- Operation and maintenance: run the system with a setup that can keep up with PHP and framework updates
In our PHP System Replacement service, we commit to completing steps 1 and 2 and showing you new screens within one week of starting.
Common pitfalls and how to avoid them
| Common mistake | What happens | Countermeasure |
|---|---|---|
| Skipping the assessment | “It turns out it also did this” keeps coming up mid-development, and time and cost balloon | Recover the specs with AI first, list screens, features and data, then quote |
| Switching everything at once | Problems pile up on cutover day and operations stop | Switch over in phases, feature by feature |
| Carrying over every current spec | Even unused features get rebuilt, driving up cost | Check actual usage and don’t rebuild unused features |
| No plan for verifying data | Missing or garbled migrated data is discovered only later | Define how to reconcile record counts, totals and samples, and verify in a rehearsal |
| No rollback procedure | When problems occur, you can’t go back to the old system | Before switching over, define the criteria and procedure for rolling back |
Thinking about cost and timeline
The cost of a replacement depends mainly on the number of screens and features, the volume and complexity of the data, and the number of integrations with external services. An initial assessment is essential for an accurate quote. Generative AI shortens both this assessment and the routine implementation of screens and data processing, making it easier to shorten the timeline for a project of the same size.
If your budget is limited, rather than rebuilding everything at once, you can replace features in order, starting with those with the biggest security problems and those used most often. You confirm the results of the first phase before moving to the next, which also makes investment decisions easier.
We have no specs and can’t reach the company that built it. Can it still be rebuilt?
Isn’t upgrading the PHP version enough?
Is AI-written code a problem for quality or security?
Can we maintain the system ourselves after the rebuild?
Summary
Legacy PHP systems carry three risks: vulnerabilities that never get fixed, the system stopping on the server, and no one being able to fix it. A replacement starts with assessing the current system, and for systems that can’t be stopped, phased switchover is the standard approach. Generative AI greatly shortens spec recovery, rewriting and comparison-test preparation, making it possible to rebuild even systems without specs. ReedRiver takes on PHP system replacement using AI vibe coding as contract development. We show you new screens within one week of starting, so begin by asking us for an assessment of your current system.










