Creating a backup of your PrestaShop store is essential to protect your data against human errors, bugs, hacking, or losses related to your hosting provider. Here is how to set up backups of your various data.
1. Backup the store files.
The files of your store contain everything related to the theme, modules, images, and the core of PrestaShop.
a. Via FTP (manually)
- Log in to your server using an FTP client (such as FileZilla).
- Download the entire directory of your site (often named
www,public_htmlor other depending on the host). - Store them in a folder on your hard drive or a secure storage service (cloud, NAS…).
b. From your host's panel
Many hosts offer an option for automatic or manual backup through their interface (cPanel, Plesk…). Access the interface of your hosting service and configure frequent automatic backups.
2. Backup the database
The database contains critical information: clients, orders, products, configuration, etc.
a. Via phpMyAdmin
- Log in to phpMyAdmin from your hosting provider.
- Select the database of your store.
- Click on "Export" and then choose:
- Quick method
- SQL Format
- Click on "Execute" to download the file.
.sql.
b. Automation possible with a module.
There are PrestaShop modules that allow for the automation of backups. Visit the PrestaShop Marketplace to explore these possibilities.
3. Automate backups (recommended)
- Set up remote storage (Amazon S3, Google Drive, Dropbox, remote FTP) to prevent data loss in the event of a server crash.
-
Advanced option: use cron jobs to run custom regular backup scripts.
Best practices
- Regularly back up your data, ideally every day if you have significant activity.
- Test your backups by restoring a mirror site to ensure that everything functions correctly.
- Secure the backups: encrypt them if necessary, and retain multiple versions.
| 💡 Do not hesitate to also consult the article on How to Restore a Backup of Your Offline Store |