In the past, I was a PrestaShop developer. One of my responsibilities was to keep clients safe from disasters.
You can achieve that by adequately managing backups and knowing how to restore them.
The backup and restoration process is not complicated. It is easy to make databases, files, images, categories, or product backups.
In this article, I will share many tips from my ten years of experience. I will explore:
- Why PrestaShop Hosting Backups Are Bad
- How To Backup PrestaShop
- How To Backup PrestaShop Database
- How To Backup PrestaShop Database Without PhpMyAdmin
- How To Backup PrestaShop Files
- How To Backup PrestaShop MultiStore
- How To Backup PrestaShop Images
- How To Backup PrestaShop Products
- How To Backup PrestaShop Categories
- PrestaShop Backup Best Practices
- Best PrestaShop Backup Advice
Why PrestaShop Hosting Backups Are Bad
Every single hosting provider does backups.
But sometimes they do it once a week or even once a month.
Backup storage costs money for your hosting provider so they do it one in a while (week for example).
Some providers will advertise that they do constant backups, but be aware that you will be charged for backups restoration.
I had an experience where a single backup restore was 50 USD. The store owner had to pay for this because there were no other backup options available.
Doing manual backups is “free”: it will consume some of your PC disk space and just 5 minutes of your time each month.
How To Backup PrestaShop
PrestaShop backup is two steps process overall.
To backup the database, go to PhpMyAdmin, click Export, and export the entire database to SQL format. Follow the detailed guide in the section below.
To backup files, open your PrestaShop project with the remote file manager (like FileZilla) and download the entire PrestaShop folder to your computer. Follow the detailed guide in the section below.
It is necessary to back up every single file you have. If you will backup only media (uploads), you still risk restoring PrestaShop because your database backup can include some plugin config that could be incompatible with the plugin code you have updated in your store.
How To Backup PrestaShop Database
Most hosting providers will give you access to a tool named PHPMyAdmin.
With this free tool, you can manage your database or fix any issues in your system when you can’t access PrestaShop back office.
Let’s use this tool for PrestaShop store backups.
Check your hosting provider docs for database access tool URL and open it in your browser. Sometimes hosting providers give you a direct URL to a tool that does not require you to log in. But if you see the login window instead – enter their login details the same as you have for your PrestaShop configuration.
Open database (1) and from the top menu choose Export (2) menu option.
In the opened page, choose Quick in the Export method (3) section and then SQL as Format option (4). This way, restoring the database later is the easiest way.
Click the Go (6) submit button, and you should receive exported PrestaShop database as a simple text file. You can zip it and store it somewhere on your disk drive. Zipped files should take 10-100 times less disk space.
Here, a helpful tip is to name your database file with the following format:
[STORE-NAME]-[DATE].sql. This way, you won’t mix your backup with other stores, and from the date, you will know what version is the latest.
How To Backup PrestaShop Database Without PhpMyAdmin
There are more tools similar to PhpMyAdmin.
Top 4 free alternatives to PhpMyAdmin:
If your hosting provider does not give you any database management tools, just download Adminer. It is a single file PHP script that you would upload to your FTP server and will be able to access the database.
How To Backup PrestaShop Files
For this, you will need to connect to your hosting file system with a free tool like FileZilla.
Open this tool, and in the top navigation bar, you will see the ability to enter Host, Username, Password, and Port for your FTP service. Once you do that, click the Quick connect button.
Suppose the connection to the FTP service is successful. In that case, you should see the
Status: Directory listing of \"/\" successful message in the log block.
On the right side of FileZilla, you will see your folder structure from the FTP server. First, find the main folder where your store is installed.
On the left side, choose the folder (f.e. Downloads) from your computer where you will store a backup.
Then click the right mouse button and choose the Download option on your PrestaShop folder.
When downloads happen, you should see the Queued files list move to the Successful transfers list on the bottom block. This will indicate that files are downloaded.
If you see Failed transfers – retry download again, and when asked – choose the “Skip” option. This will quickly rescan what you have downloaded and only redownload missing/broken files.
I suggest compressing this entire downloaded backup as it will consume a lot of disk space. Once compressed it should take just few MB (megabytes).
Also, name your zipped backup file to
[STORE-NAME]-[DATE].zip so that later it is easier to figure out the latest backup for a particular store.
How To Backup PrestaShop MultiStore
There are no special instructions for backuping MultiStore setups. Whether your store is multi or not – it will contain one database and one folder with all the files.
So two sections above explain backups of that just fine.
How To Backup PrestaShop Images
It is always better to make entire files backup than just backuping images.
PrestaShop stores uploaded files to uploads folder, while plugins can store uploaded content to modules folder. So you are risking losing your images if you are not careful enough.
If you still want to backup only images, just backup uploads and modules folders.
How To Backup PrestaShop Products
You can always backup your products information by navigating to the back office and clicking Catalog → Products (1).
Click the cog icon from the top-right corner and choose the Export option (2). This will download CSV (CSV stands for Comma Separated Values file). You can restore products later by using the same cog icon and Import feature.
How To Backup PrestaShop Categories
You can always backup your categories information by navigating to the back office and clicking Catalog → Categories (1).
Click the cog icon from the top-right corner and choose the Export option (2). This will download CSV (CSV stands for Comma Separated Values file). You can restore categories later by using the same cog icon and Import feature.
PrestaShop Backup Best Practices
Always do a backup just before upgrading PrestaShop. It has saved me a few times where, after the PrestaShop upgrade number of issues were found and restore was required.
A good idea is to the backup site when you are doing lots of plugin updates. PrestaShop does not offer plugins downgrade, so if a plugin causes any issues and you can’t fix them – files backup is your friend.
Best PrestaShop Backup Advice
If you can afford it – launch a private duplicate store. Sometimes it is called beta or staging environment.
This saved many of my past customers who lost just some resources (a few images or some Excel files). Restoring those from a backup store is way easier than locating the same resource from a big backup zip file.
In this article you have learned that you should not trust your hosting provider for making your backups. They do it once a week or month, and by the time disaster will happen – they might be outdated.
To backup PrestaShop store:
- Download database backup with PhpMyAdmin, Adminer
- Download files with FileZilla
- Compress database and files
- Name your file
More good articles about store management are in our PrestaShop blog