How to backup Prestashop 1.7?
Prestashop consists of two sets of data:
Both have to be copied (backed up).
To create a backup of the shop, these are the simplest steps you can perform:
- Create a database backup from prestashop’s Backend. (Advanced Parameters -> Database -> Tab: DB Backup)
- Copy all files (that belong to your Prestashop installation) to a safe location. Example: Zip all files into an archive on the server. Then download the compressed archive file to your local hard drive. If your hosting provider does not support compressing files on the server, you will have to download all of them from the current hosting provider to your local hard drive fia FTP (e.g. using FileZilla).
In order to restore the shop, you have to put the shop into maintenance mode (take it offline). Then you perform these steps:
- Import the database backup to the new database using phpMyAdmin
- Upload all files to your webspace.
If you have chosen to use a different database to put your restored shop: Modify the file /app/config/parameters.php to point towards the new database.
If you have chosen a different folder on the server where the files shall live (new path for the files of your restored shop on the server): Modify the DNS entry in your domain so the shop URL will now point to the new server path.
If you have a new URL where the shop shall live, look for the table containing URL in the database. The table is called: Prefix_shop_url. There should be exactly one table in the database containing URL in the name. Change the value to represent the new address of your shop.
The same steps could also be applied if you want to move your Prestashop installation from one webhosting provider to another. However be aware: This probably works ONLY if all the surrounding parameters of your old and new webhosting provider are exactly identical. This means PHP version and other server conditions and parameters. Unfortunately, this is unlikely to be the case. Therefore, this guide has little practical relevance for this purpose. To move to a server with a different PHP version, a clean reinstall should solve the problem. The database import is going to work if Prestashop will be installed with the same version. For migrating the files, a different guide is required, in order to learn which files are actually required to copy contents, and which files must not be touched in order to keep the shop functional.
Something doesn’t work?
These are the common fixes which can do magic, before you despair:
- Disable friendly URL’s, save, enable friendly URL’s (Shop Parameters, SEO & URL’s) This rewrites the .htaccess files
- Rebuild search index (Shop parameters, search)
- Clear cache (Advanced shop parameters, performance)
- Template compilation: Force compliation (Advanced shop parameters, performance)