Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

Help for owners

After a PHP upgrade my website shows errors or a blank page

Short answer

Newer PHP versions remove or change old behaviour, so an old site can fail the day the version changes. The quick, safe step is to ask your host to switch back to the previous PHP. Then plan a tested upgrade, because old versions stop receiving security fixes.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Does this sound like your situation?

  • My website went blank or shows an error right after my host updated PHP.
  • Only some pages fail, such as checkout or the admin area.
  • My host says my PHP version is end of life and will be switched off.
  • A plugin or theme is no longer supported.
  • Nobody remembers which PHP version the site was written for.

Why does this happen?

  1. PHP versions have a limited life

    php.net says each release branch gets two years of active support, then two more years of critical security fixes only, and after that it is end of life. It warns users of end of life releases to upgrade as soon as possible.

  2. Old code uses things newer PHP removed

    Features are deprecated and then removed over versions. A site that ran for years can hit a removed feature the day its host changes version.

  3. Warnings became errors

    Code that only gave a notice before can now stop the page.

  4. Plugins, themes and libraries lag behind

    Third-party code may not support the new version, or may be abandoned.

What can I do about it today?

  1. Ask your host to switch back to the previous PHPMost hosts let you choose the version per site. This is usually reversible and brings the site back.
  2. Do not edit code or delete plugins to fix itGuesses can turn an error into a lost page or lost data.
  3. Take a backup before any further changeFiles and database, stored outside the server.
  4. Write down the exact version and the dateThe version before and after, and when the error began. It saves an engineer hours.
  5. Note the end-of-life date of the old versionCheck php.net's table, linked below, so you know how long you can stay on the older PHP.

When should I bring someone in?

  • Going back does not work or the host will not allow it.
  • The site is old and nobody can say what framework it uses.
  • The old PHP version is already end of life.

How do I handle it?

  1. Reproduce the error on a copyI run a copy of your site on the new version and read the error messages.
  2. Fix what the new version rejectsCode changes are small and focused on what the version no longer accepts.
  3. Update or replace the old librariesDependencies are upgraded, or replaced where they are abandoned.
  4. Test, then switch with a rollbackI check key flows on the copy before switching, and keep the old setup available to go back.

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?

Can I stay on the old PHP?

For a while. php.net says an end of life branch is no longer supported and users should upgrade as soon as possible, so it is a short-term step.

How long does an upgrade take?

It depends on the size and age of the code. I give a written scope after reading it.

Will I lose data?

Not if a backup is taken first and the upgrade is tested on a copy.

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

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.