PrestaShop 1.7 to 8/9 Upgrade: Strategies for a Smooth Transition and PHP Security

Upgrading PrestaShop, especially across major versions, can be a daunting task. A recent forum thread highlighted a common scenario: MaxV2019's attempt to upgrade PrestaShop 1.7.8.6 to PrestaShop 8, driven by critical PHP 7.4 vulnerabilities (CVE-2026-109618, CVE-2026-109619). This thread provides invaluable community insights into overcoming typical upgrade hurdles.

The Upgrade Challenge: PrestaShop 1.7.8.6 to 8+

MaxV2019 faced multiple errors during both web and CLI upgrade attempts, including "can't delete folders" and "server not responding." The primary blocker was the absence of api_public_key and api_private_key in /app/config/parameters.php – parameters essential for PrestaShop 8 but not present in 1.7. This raised a crucial question: Is an in-place upgrade from 1.7 to 8 truly viable?

Expert Strategies for a Successful PrestaShop Upgrade

The community offered comprehensive guidance, focusing on preparatory steps and two main upgrade strategies:

1. Prioritizing PHP Security

Before any PrestaShop upgrade, address the underlying PHP vulnerabilities. As Fred at PrestaHeroes noted, upgrading PrestaShop doesn't patch PHP itself. Users should:

  • Confirm with their host if PHP 7.4 includes backported security patches.
  • Plan to upgrade to officially fixed PHP versions (e.g., 8.2.35+, 8.3.36+, 8.5.12+).

2. Choosing Your Upgrade Path: Staged vs. Fresh Install

A. Staged In-Place Upgrade

This method involves upgrading the existing shop incrementally. Key recommendations:

  • Rigorous Backups: Always create full file and database backups before each stage, performing upgrades on a development copy.
  • Module & Theme Management: Disable all third-party modules and switch to the default theme. Re-enable/update only after the core upgrade is stable.
  • Incremental Steps: A typical path: 1.7.8.6 → 1.7.8.11 → 8.2.8 → 9.2.0, adjusting PHP versions (e.g., PHP 7.4 for 1.7.x, PHP 8.1 for 8.x, PHP 8.5 for 9.x) at appropriate stages.
  • Module Compatibility: Use the correct version of the PrestaShop "Upgrade assistant" module.

B. Fresh Installation & Data Migration

Often preferred for major version jumps, this approach involves installing the target PrestaShop version cleanly and then migrating data. Benefits:

  • Clean Slate: Eliminates accumulated old files and overrides, leading to a more stable foundation.
  • Predictability: Allows thorough building and testing of the new shop on a development environment.
  • Migration Tools: Reliable tools like "Migration Pro" are recommended for transferring core data (products, customers, orders).

3. The Critical Fix: Missing API Keys

Prestachamps provided the direct solution for the missing api_public_key and api_private_key error:

  • These keys, for the Admin API introduced in PrestaShop 8.1, should be auto-generated by the upgrade tool.
  • Primary Cause: Outdated Upgrade Module. Older versions (4.x) of the "Upgrade assistant" module lack this feature; it was added in version 5.x.

    Solution: Download the latest autoupgrade module directly from PrestaShop's GitHub. Installing the updated module resolves the parameter error.

  • Secondary Cause: OpenSSL Unavailable. If the PHP CLI environment lacks OpenSSL, key generation can fail.

    Solution: Verify OpenSSL with

    php -m | grep -i openssl
    .

4. General Troubleshooting Tips

  • "Server not responding": Often a PHP max_execution_time or memory_limit issue. Use CLI for upgrades with memory_limit at 1536M and a generous time limit.
  • "Can't delete folders": Typically a file-lock/ownership problem. Clear opcache and ensure the shop directory is writable by the PHP user.

The community consensus is clear: PrestaShop upgrades require careful planning and execution but are entirely feasible. Identifying specific root causes, such as an outdated upgrade module for API key generation, is often key to a successful transition to a newer, more secure PrestaShop version.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools