Moving PrestaShop to PHP 8
No version in the PrestaShop 1.7 branch, from 1.7.0 to 1.7.8, runs on PHP 8. When a host gradually drops PHP 7 from its offering, a shop still on 1.7 faces a choice that’s nothing like a simple setting: migrate the PrestaShop version, or stay on an unmaintained PHP version.
Why it’s never just a setting on the host’s side
On a PrestaShop 1.7 install, forcing PHP 8 in the hosting settings doesn’t work: Smarty, the template engine used by 1.7, crashes immediately. Version 1.7.8, the latest in the branch, supports PHP 7.4 at best. So there’s no possible combination between PrestaShop 1.7 and PHP 8: it isn’t a configuration to tweak, it’s a fundamental mismatch between the version’s code and the language running it.
Compatibility arrives with PrestaShop 8.0, which introduces support for PHP 8.0 and 8.1, with PHP 7.2.5 as the minimum required for that version. PrestaShop 8.2, released in September 2024, adds full support for PHP 8.2. PrestaShop 9.0, more recent still, requires PHP 8.1 at minimum and supports PHP 8.2, 8.3 and 8.4. So moving to PHP 8 first means migrating PrestaShop itself to version 8 at least, before server configuration even enters the picture.
The subject doesn’t stop at the PrestaShop version
Once PrestaShop itself is PHP 8 compatible, the work isn’t over. Many older modules use curly-brace syntax for accessing arrays or strings, such as $array{0} instead of $array[0]. That syntax was removed in PHP 8 and triggers a fatal error if a module still uses it. Every third-party module needs checking, and sometimes fixing, regardless of its official compatibility claim with the installed PrestaShop version: a module can declare itself PrestaShop 8 compatible while still carrying this kind of legacy syntax.
That’s why the move happens in two distinct stages: first the PrestaShop version, then a module-by-module check of actual PHP 8 compatibility, not just the declared one.
- 1.7.0 → 1.7.8 no version runs on PHP 8
- PHP 7.4 the latest PHP version PrestaShop 1.7.8 supports
- PrestaShop 8.0 PHP 7.2.5 minimum, support for PHP 8.0 and 8.1; PHP 8.2 from 8.2 onwards
- PrestaShop 9.0 PHP 8.1 minimum, support up to PHP 8.4
Official PrestaShop documentation
How I go about it
-
Check the current PrestaShop version
I identify the installed version and compare it against the PHP versions it actually supports, not the ones advertised by the host.
-
Migrate PrestaShop first
If the shop is still on 1.7, I migrate it to at least version 8 on a test copy, without touching the production server.
-
Copy the environment and force PHP 8
On that copy, I point execution at PHP 8 to see the actual errors before any move to production.
-
Check every third-party module
I review the installed modules, flag outdated syntax such as curly-brace array access, and fix or replace whatever’s blocking.
-
Switch to production once validated
The switch to PHP 8 on the hosting side only happens after full validation on the copy, never before.
Knowing whether your host plans to drop a PHP version
A host dropping a PHP version is almost always announced in advance, usually by email or through a notice visible in the hosting control panel. These notices generally give a deadline by which the version needs to change. That’s the window to use for migrating PrestaShop under good conditions, rather than waiting for the change to be forced overnight.
Go further
Describe your need in one minute
A few targeted questions so I can reply with an estimate rather than another questionnaire.