Database backup
Back up the database before any action that changes or deletes data, for example:
- before the first run of the PrestaShop cleaner module,
- before uninstalling a module (some modules delete their data),
- before a major update of a module or PrestaShop.
Deleting records cannot be undone. A backup is the only way back to the data.
How to make a backup
Section titled “How to make a backup”One of these ways is enough.
1. In the hosting administration
Section titled “1. In the hosting administration”Most hostings offer backups (a full backup or a database backup). The procedure is in your hosting’s documentation. Download the backup off the server as well.
2. Via phpMyAdmin
Section titled “2. Via phpMyAdmin”- Open phpMyAdmin (usually available from the hosting administration).
- Choose your shop’s database.
- Click Export and keep the quick export method in the SQL format.
- Store the saved file safely.
You find the database name in the file app/config/parameters.php in the PrestaShop root (the database_name field). Do not send the access data in this file to anyone.
3. From the command line
Section titled “3. From the command line”On a server with SSH access:
mysqldump -u USER -p DATABASE_NAME > backup.sqlAfter running the command you enter the database password.
What to back up besides the database
Section titled “What to back up besides the database”If you edit a module, a backup of the modules/ folder and uploaded files (img/, upload/) is also useful.
Check that the backup works
Section titled “Check that the backup works”A backup you have never tried to restore may not work. At least make sure the file is not empty and contains your shop’s tables (look for CREATE TABLE in the SQL file).
Thank you for your answer.
We are sorry. Tell us what is missing or unclear:Write to support