PrestaShop Upgrade on Multiple Environments: Database Update Issues and Best Practices

PrestaShop Upgrade Challenges Across Development Environments

A PrestaShop user, ldam, encountered issues while upgrading their shop from version 8.2.1 to 8.2.3 across multiple environments (local, staging/recipe, and presumably production). They used the Update Assistant module locally and merged the updated files into their staging branch. However, after deploying the files to the staging environment, the database remained at version 8.2.1, while the files were updated to 8.2.3.

The Update Assistant module on the staging environment only offered an upgrade to version 9.0, incorrectly assuming the shop was already on 8.2.3. The user sought advice on how to correctly update the database in the staging environment and the general best practices for upgrading PrestaShop across different environments.

The Problem: Database Synchronization After File Updates

The core issue was the database not being automatically updated to match the file version after deploying the updated files to the staging environment. The Update Assistant module failed to recognize the correct current version and offered an incorrect upgrade path.

The Solution: Environment-Specific Upgrades

Prestashop Addict responded, advising that the upgrade process should be performed on each environment separately. The suggested workflow is to first upgrade the staging environment. If the upgrade is successful on staging, then proceed with the upgrade on the production environment, without transferring the files again. This implies that the file deployment should happen *after* the upgrade process in each environment, or that file deployment should be done independently of the database upgrade.

Key Takeaways for PrestaShop Upgrades:

  • Environment Isolation: Treat each environment (local, staging, production) as independent during the upgrade process.
  • Update Assistant per Environment: Run the Update Assistant module separately on each environment to ensure proper database updates.
  • Staging First: Always upgrade the staging environment before production to identify and resolve potential issues.
  • File Deployment Timing: Carefully consider when to deploy files relative to running the Update Assistant. Deploying files *before* upgrading the database can lead to the Update Assistant misidentifying the current version.

This approach ensures that each environment's database is correctly updated to match the corresponding file versions, minimizing the risk of errors or inconsistencies during the upgrade process.

Start with the tools

Explore migration tools

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

Explore migration tools