# 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.

- Source canonique : [https://allaux.fr/en/prestashop/migration/passer-a-php-8](https://allaux.fr/en/prestashop/migration/passer-a-php-8)
- Langue : EN
- Dernière mise à jour : 2026-09-30

## Direct answer

> No 1.7 release runs on PHP 8, including 1.7.8 which tops out at PHP 7.4: migrate PrestaShop to 8 or 9 before changing the PHP version, never the other way round. PrestaShop 8 needs PHP 7.2.5 as a minimum and supports 8.0 to 8.2; PrestaShop 9 requires PHP 8.1 at least. Every third-party module then has to be checked one by one.

## 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.

| Valeur | Description |
|---|---|
| 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 |

Source : Official PrestaShop documentation

## How I go about it

1. **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.
2. **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.
3. **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.
4. **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.
5. **Switch to production once validated** — The switch to PHP 8 on the hosting side only happens after full validation on the copy, never before.

## Staying on an old PHP version isn’t a lasting fix

> A host drops a PHP version because the language’s own maintainers have stopped maintaining it. Staying on it means being exposed to security flaws that will never be patched, even if the host still tolerates it for a while.

## 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

- **1.7 to 8 migration** — What actually changes between PrestaShop 1.7 and 8. ([/prestashop/migration/1-7-vers-8](/prestashop/migration/1-7-vers-8))
- **Incompatible modules** — How to identify and replace modules that don’t migrate to the new version. ([/prestashop/migration/modules-incompatibles](/prestashop/migration/modules-incompatibles))
- **Changing host while migrating PrestaShop** — Why it’s often better to separate a version migration from a hosting change. ([/prestashop/migration/changer-d-hebergeur](/prestashop/migration/changer-d-hebergeur))

## FAQ

### Can I just ask my host to enable PHP 8 on my 1.7 shop?

No. No version of PrestaShop 1.7 runs on PHP 8, Smarty crashes immediately. PrestaShop needs migrating to at least version 8 before PHP 8 is even an option.

### Which PHP version should I aim for given my PrestaShop version?

PrestaShop 1.7.8, the latest in its branch, is limited to PHP 7.4. PrestaShop 8 accepts PHP 7.2.5 as a minimum, with support for PHP 8.0, 8.1 and, from 8.2 onward, PHP 8.2. PrestaShop 9 requires PHP 8.1 at minimum and supports up to PHP 8.4.

### Once PrestaShop is migrated, will my modules just work on PHP 8?

Not necessarily. Some older modules use curly-brace array access syntax, removed in PHP 8. Each module needs checking individually, even if it declares itself compatible with the installed PrestaShop version.

### How do I know if my host is about to drop PHP 7?

This kind of change is generally announced in advance, by email or through a notice in the hosting control panel, with a deadline stated.

### How can I test PHP 8 compatibility without risking the live shop?

I work on a full copy of the shop, forcing execution to PHP 8 to see the actual errors and fix what’s blocking, before any switch on the production server.
