Help for owners
My business runs on an old PHP app that needs updating
Short answer
PHP versions stop receiving fixes after a fixed period, and running an unsupported one can expose you to unpatched security holes. An old PHP app can usually be upgraded step by step, with tests on a copy. Do not ask your host to force a newer PHP on the live site before the app has been checked.
Does this sound like your situation?
- My host says my PHP version is being retired.
- Pages show warnings or blank screens after the host changed something.
- The app is built on an old framework such as an early CodeIgniter or Laravel.
- No developer wants to touch it, and nothing is documented.
- A security scan or my payment provider flagged old software.
Why does this happen?
Every PHP version has an end date
The PHP project supports each release branch with fixes for two years, then with critical security fixes only for two more. After that the branch reaches end of life, and users should upgrade as soon as possible, since they may be exposed to unpatched security vulnerabilities.
Confirmed by php.net
New PHP removes or changes old behaviour
Code written for an older PHP can show warnings or stop working on a newer one, for example when a function was removed or null values are handled differently.
Technical detail: PHP warns that null is passed to a built-in function
The framework and its add-ons age as well
The framework, its libraries and its plugins each have their own support period. Upgrading PHP alone is not enough if they no longer run on it.
Technical detail: require(vendor/autoload.php): Failed to open stream: No such file or directory
The app has no tests
Without automatic checks, nobody can tell quickly what an upgrade broke. That is why it feels dangerous to touch.
The original developer is gone
Knowing why a piece of code exists is often lost. The upgrade has to rediscover it from the code and the data.
Technical detail: Replacing strftime() and gmstrftime() in PHP 8.1 and later
What can I do about it today?
- Find out which PHP version you runAsk your host or developer for the PHP version and the framework version. Write both down.
- Check your host's deadlineAsk when the old version will be switched off, and whether a later date is possible.
- Do not switch the PHP version on the live siteChanging it without testing can take the site down. Ask for it to be tried on a copy first.
- Take a full backupFiles and database, kept where you control them, before anyone starts.
- List the parts you cannot loseCheckout, bookings, customer logins, reports. These are what the upgrade is tested against.
When should I bring someone in?
- The site takes payments or customer data.
- Your host has given a date after which the site stops working.
- No one can tell you what the app does or where its code is.
How do I handle it?
- Assess the appI check the PHP and framework versions, the libraries and how much of the code is affected, and tell you the options in writing.
- Work on a copyA copy of the site and data runs on the target PHP version, so the live site is not touched.
- Upgrade in stepsI raise the version step by step, fix what breaks and add checks for your key flows, so each step is proven.
- Switch with a way backThe change is made after a backup, with a tested rollback.
- Say when a rewrite is smarterIf upgrading would cost more than rebuilding, I show you the comparison and let you decide.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
Is my site unsafe right now?
The PHP project says an unsupported branch may be exposed to unpatched security vulnerabilities. Whether your site is affected depends on the version and what else protects it, which I check.
Can the host just keep the old version for me?
Some hosts do for a while, some do not. It is the host's decision, so ask them in writing.
Do I have to rewrite everything?
Often not. Many old PHP apps can be brought up to date in steps. The rewrite question has its own page.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.
For your developer: the technical fixes
Deprecated: Passing null to parameter #1 ($string) of type string is deprecatedPHP warns that null is passed to a built-in functionDeprecated: Function strftime() is deprecatedReplacing strftime() and gmstrftime() in PHP 8.1 and laterDeprecated: Array and string offset access syntax with curly braces is deprecatedPHP: array and string offset access with curly braces is deprecatedTrying to access array offset on value of type nullPHP: Trying to access array offset on value of type nullWarning: require(vendor/autoload.php): Failed to open stream: No such file or directoryrequire(vendor/autoload.php): Failed to open stream: No such file or directory