PrestaShop is MySQL driven application and as such sometimes there is the need for the database of the application to be restored from previously taken backup. In this tutorial we will completely cover this process and you will be able to easily handle this task on your own.
PrestaShop provides a feature which allows easy the database directly from the application. This feature is named DB Backup and it is located at your PrestaShop Admin area > Advanced Parameters > DB Backup.
Once you access that feature you will be presented with a warning message related to the fact that PrestaShop is not responsible for the database, its backups and/or recovery.
At the bottom of this message you will be able to notice a button indicating your agreement to these terms and for the automatic generation of a backup for the database of your application.
Once pressed this button will automatically generate a backup for your database which will be listed in the table located bellow this Declaimer.
From this table you will be able to download the backup by simply clicking on it once you locate it. You will then be presented with an archived version of your database which will be automatically downloaded on your local computer the same as stored on your hosting account.
In order for an existing backup to be restored the process is fairly simple and we outline it as points below:
You can either download this file via your cPanel > File Manager or you can directly choose the View option of the File Manager feature which will present you with the code of this file directly in your browser.
The name of your database is shown on the 3rd line of the file under the following code:
As soon as you access the database of your application via the phpMyAdmin feature you should select all of the tables and drop them using the Drop command from the “With Selected” drop down menu.
The restoration process proceeds with the import of the backup you have on your local computer after you have dropped the tables from the database of your application. In order for the backup to be imported you should access the import feature of the phpMyAdmin application and select the backup file from the Choose File button of the import feature.
Upon a successful import you will be presented with message that the import was finished or respectively with an error message if there was any error with the import.
Once this process is finished your database restoration process is completed and your application should be accessible and you should simply perform the final step.
Enable your shop via the Maintenance section located inside your Store’s admin area > Preferences > Maintenance by simply changing the Enable Shop value to “Yes”.
Congratulations! You can now backup and restore the database of your Store!