PHP errors appeared after a version change
Changing the PHP version is the fastest way to improve a site’s response times, and also the most brutal. Over successive versions the language removed behaviours tolerated for years: what produced a discreet warning becomes an error that stops the page. The message on screen always contains the answer.
Read the message rather than fear it
A PHP error message holds four pieces of information: the nature of the problem, the file, the line, and the chain of calls that led there. The file alone almost always names the culprit. If it sits in a module or theme directory, that component needs updating or replacing — not the CMS core, and not the PHP version.
The families of message are few. A function removed from the language produces a call-to-undefined-function error. A data type that became strict produces an argument error. Reading a value missing from an array, long tolerated, is now reported far more loudly. Those three cases cover the vast majority of breakages I meet.
Frame it before fixing
-
Check the version actually in use
Many hosts allow a different version for the website and for command-line runs. A scheduled task can therefore fail while the site works, or the reverse.
-
Count the components involved
If one module appears in the messages, the fix is bounded. If the theme and five modules appear, the question becomes replacing them, not repairing them.
-
Check the CMS’s stated compatibility
Each PrestaShop or WordPress version states which PHP versions it supports. Using a version newer than intended produces errors even with no third-party module.
-
Look at changes made in the core
A site whose core was edited directly no longer benefits from the compatibility fixes published upstream. That is often where errors concentrate.
-
Test on a copy
The PHP version changes in seconds in the hosting panel, but the trial happens on a copy of the site, never in production on a busy day.
Fix, replace, or step back
- Fix when the faulty code is yours: an override, a bespoke module, an adapted theme. The simplest and most durable case.
- Update when the component is maintained: the recent version is almost always compatible, and the problem goes away without writing a line.
- Replace when the component is abandoned: maintaining an unsupported module yourself costs more than it looks.
- Reverting to the previous version stays possible and immediate, but it is only extra time, not a solution.
Carry on with the right page
-
Moving to PHP 8 on PrestaShop
The known breaking points and the PrestaShop procedure.
-
PHP and WordPress
The version upgrade on WordPress, plugins included.
-
PHP versions at end of life
Why staying on an old version becomes a security problem.
-
Enabling debug mode
To surface the full message instead of a blank page.
Describe your need in one minute
A few targeted questions so I can reply with an estimate rather than another questionnaire.