Updating PrestaShop is an essential action for security, performance, and to benefit from the latest features. However, an update can sometimes seem complex. Here are the best practices to adopt on a daily basis to ensure reliable, smooth, and painless updates.
The foundations
Work on a clean server
Before any update, ensure that your server meets the prerequisites recommended by PrestaShop: PHP version, MySQL version. Refer to the article What are the required configurations for your PrestaShop store server to learn more.
Check your modules and themes.
- Ensure that your modules and themes come from reliable sources.
- Verify if they are compatible with the targeted version.
- Prefer modules and themes that are regularly updated, with a recent last update.
- Avoid dangerous customizations in a theme and use a child theme for your customizations.
- List your modules and themes, removing those that are no longer useful or maintained.
- If the module is a custom or unofficial module, contact the module developer.
- If you are using a theme or module from the PrestaShop Addons marketplace, ensure that you have installed the latest update of the theme from the developer.
Organization and documentation
Document your customizations
Keep the list of your modules, customizations, modified files, hooks used, as well as the version history of your server up to date. You will immediately know what may have an impact during an update.
Keep your access and environments well organized.
Maintain a clear list of FTP access, back-office, and database. Manage your module licenses and keep a ready-to-use pre-production environment.
Security and daily maintenance.
Keep reliable and tested backups.
Regularly check that you know how to restore your store. Always keep a complete copy: files, database, modules.
Some hosting providers offer a backup solution for example over a rolling 30-day period.
Maintain a clean database.
Clean the logs, abandoned carts, and remove orphaned tables.
Certain modules exist to accomplish this, or you may do it using SQL queries.
Monitor errors and logs.
Regularly consult the server logs and PrestaShop. Detect invisible issues before they become critical.
Monitor the performance.
Monitor the server load, the added scripts, and the size of the images folder. You can use native monitoring tools provided by your hosting provider.
You can also check the loading speed of your site using tools such as Google Page Speed.
Management of modules and themes.
- Verify compatibility with your store before adding a module.
- Check the maintenance and dependencies of a module.
- Perform regular updates of the modules.
- Update the modules one by one; this way, if an error occurs, it is more easily identifiable.
- Remove obsolete modules.
-
Also, avoid using overrides as much as possible; favor hooks instead.
Store update process.
- Have a clear versioning plan.
- Schedule the updates.
- Avoid several years of delay; update regularly.
- Systematically test in a pre-production environment before updating.
- Check critical paths: cart, payment, back-office, import-export.
- Use the official PrestaShop Update Assistant module for updates. He verifies the compatibilities, prepares the migration, and mitigates the risks.