How to Back Up PrestaShop Files and Database
In this article
To back up PrestaShop, you need two things: a copy of all files in your store's root folder and a full export of its MySQL database. Do the database first, then the files, and store both outside your hosting account. This guide walks through the manual method using cPanel or a similar control panel and FTP, plus phpMyAdmin for the database. No maintenance mode is strictly required for a manual backup, but putting the shop into maintenance mode briefly prevents new orders from being written while you export the database, which keeps the two halves consistent.
What You'll Need
- Your hosting control panel login (cPanel, Plesk, or similar) or FTP/SFTP credentials for the server.
- The database name, username, and password from your PrestaShop
app/config/parameters.phpfile (or from your hosting panel's MySQL section). - Access to phpMyAdmin or another MySQL client through your hosting panel.
- Enough free space on your computer or an external drive for both the file archive and the SQL dump.
- Optional: a maintenance-mode toggle in the PrestaShop back office under Shop Parameters > General > Maintenance.
Step-by-Step
- Put the shop in maintenance mode (recommended). In the PrestaShop back office, go to Shop Parameters > General and open the Maintenance tab. Add your own IP to the allowed list so you can still browse the front end, then enable maintenance mode. Menu labels can differ slightly by PrestaShop version, but the Maintenance tab under Shop Parameters > General has been stable for years. If you skip this, just avoid placing test orders while you work.
- Find your database credentials. Open
app/config/parameters.phpin a text editor via FTP or the hosting file manager. Note thedatabase_host,database_name,database_user, anddatabase_passwordvalues. You will need these to identify the right database in phpMyAdmin. Do not edit this file; just read it. - Export the database with phpMyAdmin. Log in to your hosting panel, open phpMyAdmin, and select your PrestaShop database from the left sidebar. Click the Export tab. Choose the Quick export method and SQL format. Leave compression off for the first run so you can inspect the file; you can choose gzip later if the dump is large. Click Go and save the
.sqlfile to your computer. Name it with the date, for exampleprestashop-db-2025-06-01.sql. - Verify the SQL dump is complete. Open the file in a plain text editor and check that it ends with a line like
-- Dump completed on ...or a finalCOMMIT;. A dump that stops mid-table is truncated and unusable. Also check the file size against the database size shown in phpMyAdmin; they should be in the same range. - Download all PrestaShop files. Connect with FTP/SFTP using FileZilla or your host's file manager. Navigate to the directory that contains
index.php,app/,modules/,themes/, andimg/. Download the entire folder, including hidden files such as.htaccess. On cPanel you can instead use File Manager to compress the folder into a ZIP and download that single archive, which is faster and less error-prone than transferring thousands of small files. - Include the upload and cache folders. The
img/folder holds product images, anddownload/holds digital products if you sell any. Both must be in the archive. You can excludevar/cache/andvar/logs/to save space, but only if you are comfortable regenerating them later; when in doubt, include everything. - Store both backups off-server. Keep the SQL dump and the file archive on your computer and on a second location such as an external drive or cloud storage. A backup that lives only on the same hosting account is lost if the account is suspended or the server fails.
- Record the PrestaShop version and date. Note the exact PrestaShop version from the back office dashboard alongside the backup. When restoring, the files and database must match, and knowing the version helps if you need to reinstall modules.
- Turn maintenance mode off. Return to Shop Parameters > General > Maintenance and disable it so customers can shop again.
Common Mistakes
- Backing up only the database. The database holds products, orders, and settings, but not the theme files, modules, or product images. A database-only backup cannot rebuild a working store on its own.
- Backing up only the files. The reverse problem: files without the database give you an empty shop with no catalog or orders.
- Exporting the wrong database. Shared hosts often have several databases. Confirm the name against
parameters.phpbefore exporting. - Missing hidden files. FTP clients hide dotfiles by default. Enable showing hidden files, or use a ZIP archive from the file manager, which includes them.
- Leaving the dump on the server. A
.sqlfile in a public folder can be downloaded by anyone who guesses the URL. Move it off the server immediately. - Not testing the restore. A backup you have never restored is a guess. At minimum, import the dump into a spare database and confirm the table count looks right.
Tips
- Back up before every module install, theme change, or PrestaShop upgrade. Those are the operations most likely to break a store.
- Automate it if your host offers scheduled backups, and still keep your own manual copy. Host backups are convenient but you may not control how long they are retained.
- Use a consistent naming scheme with the date and PrestaShop version so you can match file and database backups later.
- If your database is large, export it in gzip format to cut the download size, and keep the uncompressed copy only if you need to inspect it.
- Store at least one copy offline. Ransomware and account compromises reach cloud folders too.
Troubleshooting
- phpMyAdmin times out or the export fails. Large databases can exceed PHP limits. Ask your host to raise the limits, or export table by table, or use the command line:
mysqldump -u user -p database_name > backup.sql. The command-line method avoids browser timeouts entirely. - The downloaded archive is smaller than expected. The FTP transfer probably dropped files. Re-download using a ZIP archive from the file manager, or retry with a client that resumes interrupted transfers.
- The SQL file will not open in a text editor. It may be gzip-compressed. Extract it first, or open it with a tool that handles gzip.
- You cannot find
parameters.php. In older PrestaShop versions the file isconfig/settings.inc.php. Check both locations. - Maintenance mode blocks you from the front end. Add your IP in the same Maintenance tab, or temporarily disable maintenance mode while you check the site.
Frequently Asked Questions
Do I need to put the shop in maintenance mode to back it up?
Not strictly, but it prevents new orders from being written to the database while you export it, which keeps the file and database backups consistent.
Can I back up PrestaShop from the back office alone?
Some hosting setups and third-party modules offer one-click backups, but the back office does not include a built-in full backup tool. The manual method above works on any host.
How often should I back up?
At least weekly for an active store, and always immediately before any upgrade, module installation, or theme change.
What is the difference between the file backup and the database backup?
The files are the code, theme, modules, and images. The database holds products, categories, customers, orders, and configuration. You need both to restore a working shop.
Can I restore a backup on a different server?
Yes. Upload the files, import the SQL dump into a new database, and update the credentials in parameters.php to match the new server. Then clear the cache.
Is it safe to store the SQL dump in the cloud?
Yes, provided the cloud account is secured with a strong password and two-factor authentication. The dump contains customer data, so treat it as sensitive.