How To Backup PrestaShop
As an ex-freelance PrestaShop developer, I always ensured that my customers could recover from catastrophic failures quickly. This is done 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 products backups.
In this article, I will share many tips from my ten years of experience.
Table of Contents
- Why PrestaShop Hosting Backups Are Bad
- How To Backup PrestaShop
- PrestaShop Backup Best Practices
- Best PrestaShop Backup Advice
- More Backup Tools
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 literally costs money for your hosting provider.
Some providers will advertise that they do constant backups, but be aware that you will be charged for restoration. I had an experience where a single backup restore was 50 USD. The store owner had to pay this just because there were no other alternatives available.
Doing manual backups is “free”: it will consume some of your PC disks space and just 5 minutes of your time each month.
How To Backup PrestaShop
PrestaShop backup is two steps process overall.
To backup database, go to your database management software (like PhpMyAdmin), click on the 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 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 Quickconnect 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 zipping this entire downloaded backup as it will consume a lot of disk space.
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 were after the PrestaShop upgrade number of issues been 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 where they 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.
More Backup Tools
If you are interested in plugins for exporting PrestaShop data, we have just the right one: Complete Export Studio →
You can find more great tips at our PrestaShop blog →