Child pages
  • Updating PrestaShop
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Table of content

Updating PrestaShop

New versions of PrestaShop come every few weeks. Some are major, most are minor, but they all bring a slew of innovations, improvements and bug-fixes. It is therefore highly advised to keep up with the latest version.

There are 5 steps to follow for a successful upgrade:

  1. Save and Backup Your Current Shop
    This step consists of backing up your database and your files. This step is not avoidable for success and should never ever be ignored or skipped. Do not proceed to step 2 without completing this step.
  2. Getting Ready for the New Version
    This step consists of preparing the files that you will need to copy into the new version of PrestaShop.
  3. Starting the Update
    This step consists of starting the upgrade script which will upgrade your database.
  4. QA and Testing
    This step consists of doing various checks to make sure that the store has been properly updated to the latest version.
  5. Going Live with the New Website
    This step will accompany you in going live with the latest update.

These five steps are necessary for a successful upgrade. Please pay close attention and do not skip any steps.

Done well, the whole update process described within these pages should not take more than half an hour. Do not try to skip a step in order to be done with it faster, as they all are crucial.

PrestaShop support

Our support team is at your disposition for all technical problems related to the upgrade of your PrestaShop store:

Step 1 – Save and Backup Your Current Store

Caution

Not backing up your store constitutes a very important risk if you encounter any difficulties with the upgrade. There is a risk of data loss.

Do not ever skip this step. Do not proceed to step 2 unless you are absolutely certain that your backups are completed, successful, and fully functional. Do check several times.

Backing Up Your Files

You must save all of the files related to your PrestaShop store.

There are two main ways of backing up your files:

  • Ask your hosting company to back up your files
    Making sure that this backup is fully functional, recent, and more importantly that it reflects the content of your current store.

...or...

  • Copy all of your FTP files from your server to your local computer
    This method is only possible if your hosting provider has provided you with an FTP access to your server. Create a "Backup" folder on your computer, then, using an FTP client (such as FileZilla), select all the PrestaShop files and folders on your server (use the Ctrl-A command) and copy them to your "Backup" folder.

Deactivating Your Store

Caution

Disabling your store is very important.
By doing so, you make sure that there is no activity on your store while you are updating it. Therefore, if you ever have to revert the update using a backup, you won’t have lost any unfinished carts or orders.

Go to your store’s back-office, click on the “Preference” tab, then select “No” for the “Enable Shop” option.

In the “Maintenance IP” field, located just below the “Enable Shop” one, enter your own IP address, so that you can keep on using your store during the update. This will allow you to test the store, while still making sure visitors cannot access the website.
In order to find out your IP address, visit this page: http://www.myip.dk/

Backing Up Your Database

You must absolutely back up the whole database in conjunction to your PrestaShop store.

There are three different ways to back up your database:

  • Ask you hosting provider to back up your database
    Be sure that your database backup is functional, recent, and especially that it contains all of your data for your PrestaShop Store.

...or...

  • Download a copy of your database via phpMyAdmin
    Be sure that your database backup is functional, recent, and especially that it contains all of your data for your PrestaShop Store. If your database is too big, you might receive an error. If that is the case, you will need to contact your hosting provider.

...or...

  • Download a Database Backup from your PrestaShop Back-Office
    Visit the “Tools tab, then the “DB backup” sub-tab. This process will take between 1 and 20 minutes depending on the size of your database. Make sure this backup is functional, recent, and especially that it contains of all the data of your website. Open the zip file and make sure that there are absolutely NO ERRORS before proceeding to the next step.

Backing up Your Customized Translation

If you did not add any personalized translation at the root of your modules, please proceed to step 2.

Navigate to the “Tools” tab, then the “Translations” sub-tab of your back-office.

In the section “Export a Language” select the language to which you have made any modifications, then select your current theme, and click “Export”.

Save the downloaded file into a backup folder of your choice, on your local computer…

Verify your Backup folder

Does it contain...

  • ...a complete copy of all of your files?
  • ...a complete and error-less copy of your database?
  • ...a copy of your customized translations (optional)?

You have checked the entire backup above, and made sure that they are all correct and that you would be able to return to your current version / restore all of your data.

If you answered yes to all of the questions above, then proceed to Step 2.

Getting Ready for the New Version

Downloading and Unzipping of the Latest PrestaShop Version

Visit http://www.prestashop.com and download the latest version of PrestaShop (click the “Download” button on the homepage).

You now should have a file: prestashop_1.x.x.zip (where “x” represents the version number).

Unzip the file to your computer. If you do not yet have an unzipping tool, you can download a free one here: http://www.7-zip.org/ .

Once unzipped, open the “prestashop” folder that it contained.

In that “prestashop” folder, select the “admin” folder and rename it to something unique to you (for instance, “admin436”. Your online store currently also has a unique “admin” folder, from its original installation; you can use that unique name if you wish. If you do not know the unique name of your online store’s “admin” folder, use whichever name you want.

Copy the files backed up during Step 1 to the “prestashop” folder

Some of the folders that you have backed up will need to be copied to your “prestashop” folder.

Caution

You will be copying files from your “Backup” directory to the “prestashop” directory. Answer “Yes” when the system asks you to replace the existing files.


The following folders must be copied from your backup towards the recently unzipped “prestashop” folder:

  • “mails” folder has all the mails that you have modified.
    If you have never made any modification there, do not worry about this folder.
  • “img” folder contains your logo and all the pictures of your store (categories, products…)
  • “modules” folder, only copy the modules that you have added.
  • “themes/yourtheme” folder, only copy your current theme. If you use the default theme from PrestaShop, do not copy it, you must use the one from the new version.
  • “download” and “upload” folders, which contain all the downloadable products, the attached files and the customizable products. If you do no use any of these functionalities, do not copy these folders.
  • “classes” folder: in case you have added customized classes to this folder, copy them to the new “classes” folder. Then open each and every one of them, and rename their name, adding the “Core” suffix. For intance, “MyClasse” becomes “MyClasseCore”.
    Only change the name in the PHP class within file, not the name of the file itself.
  • “config” folders, only copy the settings.inc.php file, then modify the following lines:
    • The line that contains “PS_BASE_URI” must contain the name of the subfolder where you are going to do your update. For instance, “/prestashop/” instead of “/”, or of the name of current folder for your current store.
    • If you modified your database credentials (you should not have had to do that normally), update all the lines that contain “DB_NAME”, “DB_USER” et “DB_PASSWD” too.

Moving the “prestashop” folder to your FTP server

The “prestashop” folder that you have unzipped, now contains all the modifications from your “Backup” folder (and therefore, from your currently live store). This next step will have you upload that folder on your FTP server.

Caution

If the folder of your store is already named “prestashop”, rename the folder “prestashop” on your hard drive before sending it onto your FTP server.

If you renamed the “prestashop” folder, do not forget to update the config/settings.inc.php file accordingly, as explained in step 2-B.

Using your FTP client, upload the “prestashop” folder to your server.

Checking before going further

Let’s say your store is at the following URL: http://www.myshop.com

  1. To test the update, you first downloaded the latest version of PrestaShop.
  2. You unzipped this version, which contained a folder called “prestashop”
  3. You copied your customized files from your backup to this new “prestashop” folder.
  4. You modified the file config/settings.inc.php on line “PS_BASE_URI” so that it has the name of the folder on your server (should be “prestashop”)

For instance:

define('__PS_BASE_URI__', '/'); 

was replaced by

define('__PS_BASE_URI__', '/prestashop/');
  1. You uploaded your “prestashop” folder to your FTP server, and it can be accessed at: http://www.myshop.com/prestashop
  • No labels