Child pages
  • Making and restoring your own backup

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Now, you have a complete and recent local copy of your shop in its previous version, and your attempt at bringing your online site the latest version of PrestaShop has failed, resulting in a useless administration (the front-end should be inaccessible, since your shop should be in maintenance mode). Going back to the previous version means restoring your local copy on your online server, and that implies starting from a clean slate in order prevent old and new data to mix and further break your site.

...

Do not worry: since all these files and data have been copied are already safe and sound on your servercomputer, you will be able to restore them quickly. But since visitors will keep coming to your shop, you have to display a custom maintenance page while you are working to restore your shop.

...

Here is a basic example:

Code Block
languagehtml/xml
titleSample maintenance .htmlpage
<!DOCTYPE html>
<html>
  <head>
    <title>Our shop is under maintenance</title>    
  </head>
  <body>
    <p>In order to perform site maintenance, our online shop has shut down temporarily.</p>
    <p>We apologize for the inconvenience and ask that you please try again later.</p>
  </body>
</html>

Copy this code into a index.html text file, and upload it in PrestaShop's folder using your FTP client. On most servers, the index.html file takes precedence over the index.php file, so as you soon as you upload index.html to PrestaShop's root folder, your shop should be seen as unavailabledisplay this maintenance page instead of PrestaShop's one. Check your server's settings to make sure it is so.

...

Connect to your hosting space using your FTP client. Go to PrestaShop's folder (if it is not located at the root), select all the files and folders in PrestaShop's folder (except index.html, your custom maintenance page), and delete them all. Obviously, you should only do this if you are certain that you have an exact copy of your files backed up on your servercomputer.

This can take a couple minute, as PrestaShop has more than 7 000 files. While they are being deleted, go delete the data tables (next section).

...

Then, open the "With selected:" drop down menu at the bottom of the tables, and select "Drop". On the next screen, phpMyAdmin will ask you for a confirmation: click the "Yes" button. Again, you should only do this if you are certain that you have an exact copy of your data tables backed up on your servercomputer.

Let the process happen. Finally, phpMyAdmin will display the database, devoid of any table.

Your server is now empty of any PrestaShop file and data, except for the index.html maintenance file. It is now time to fill it put your store back up again, this time with replacement file and data that you know do work!

Restoring you files and data

As soon as your FTP client is done deleting online files, start uploading the ones that were stored on your computer! As this process can take some time, it is important to not lose some precious minutes (and therefore potential sales) being keep by keeping your shop offline for more time than necessary.

Restoring your files

This process is as easy is as the one that you followed when backing up your files:

...

PrestaShop's online folder should be empty, so as to make sure new and old files do not conflict. If you didn't delete all online files (after you backed them up, of course), you must tell your FTP client to overwrite any existing file. You must not keep any trace of the files from the upgrade that failed.

Restoring your data

This The process described here uses phpMyAdmin, which is a standard web tool. If you web host makes you use another tool for managing your databases, you will have to adapt this process to that tool. Check your webhost's documentation on the matter.

...

  1. Log into phpMyAdmin on your web server.
  2. From the main login screen, select "Databases".
  3. Click the name of PrestaShop's database to open.
  4. In the database screen, click the "Import" tab on the top set of tabs.
  5. In the import screen:
    1. In the "File to import" section, click the "Browse..." button and find your backup file from your data. It can be either the raw SQL text file (.sql), or a compressed version of it (.sql.zip, .sql.gzip, .sql.tar.gz, etc.).
    2. In the "Format" section, make sure the "SQL" format is selected.
    3. Click the "Go" button.
  6. The browser should start uploading the backup file.

...