PrestaShop has it’s own article about update process in their wiki. It easy to follow and understand but it lacks some important explanation. I will analyze the whole process thoroughly.
It’s quite easy to update your PrestaShop if you didn’t install many third party modules. Things change when you have to upgrade system with many different modules. This tutorial will explain one of the safest methods to update PrestaShop. It’s not the fastest way but it will help you to avoid some troubles.
2. Why upgrade PrestaShop?
If you have this question read this post.
2. Before you start – “Expect the best, plan for the worst and prepare to be surprised!”
We assume you don’t wont to loose your data, new customers and new orders. So we need the upgrade plan to be sure that non of the mentioned things will be lost. OK first we write the plan step by step and later we will analyze those steps.Â You can change this plan according to your experience and needs.
Shortly about the plan: first we test and only later we upgrade!
- Backup your database. More info here.
- Backup your FTP files (with .htaccess if it was created). More info here.
- Test update process locally or on a different server than your shop – if something goes wrong your shop still will be able to take orders. You can delete the backup accidentally if the test version is in the same server as your old shop – better to be sure that they are safely stored. Document important things while solving problems during update process. If you find out how to make your module work then document it – you will need it later steps and e.g. for later upgrades.
- Test your shop thoroughly after it gets upgraded locally or on a different server. It may be time consuming to make all your modules work on a new version of PrestaShop. You even may need developers help. Testing is very important before the real system update.
- Decide what is the best time to make final update to your server - e.g. usually you will not loose many customers at night but it’s up to you.
- Inform your customers that your shop will not be available because you are going to update it – this is not necessity but if you have a lot of customers better they change their plans in advance.
- Turn off your shop and write info when you’ll be back – customers like to know the real time when they will be able to buy again.
- Backup your database once more – new orders and registrations may occur during testing period. Backup the latest version before real upgrade.
- Backup your FTP files once more – backup the latest version before real upgrade.
- Export translations
- Upgrade your shop once more locally with the newest data – you may get confused why we should upgrade twice. The first upgrade is for testing purposes and to make your modules compatible with the new version. During this period your shop is taking orders, new people may register… – data is changing. As I mentioned at the beginning – this is not the fastest but safe method to make an update.
- Create directory “new_version” – first of all we will test our upgraded shop in a different directory.
- Upload the newest version of PrestaShop to the “new_version” directory
- Leave the old copy on the server untouched - you’ll be able to switch it on if the upgrade process will not succeed on your server.