Child pages
  • Automatic update

Versions Compared

Key

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

Table iTable of contentcontents

Table of Contents
maxLevel3

...

PrestaShop's automatic upgrade tool enables shop owners to backup and update their site in a few clicks and no technical knowledge.

The 1-Click Upgrade module should be available by default in the "Modules" page (in the "Administration" category): just click on its Install button, and you can use it to upgrade to the latest version of PrestaShop.

Warning

You should never update your online shop right away. The automatic upgrade tool can fail in some situations, and you might not be able to revert to the previous version.

The safest way is to have an exact copy of your shop available, either on your local computer or in another folder of your web server. It should contain all your products, categories, themes, modules, translations, settings, etc.

Make a trial upgrade on that copy of your shop. Once the upgrade is done, browse your front - and back - office thoroughly to make sure that everything is as expected. If not, then the upgrade tool has an issue with your configuration, and you should use the manual upgrade method, which is now deprecated and takes longer, but which may help in your situation.

Downloading and installing the 1-Click Upgrade module

...

If the 1-Click Upgrade module is not available in your installation of PrestaShop 1.4 or 1.5, you can download it for free from the Addons site.

Tip

Even if you have already installed the "1-Click upgrade" module, make sure you are using the latest version of the 1-Click upgrade module:

  • PrestaShop 1.4: Check the version number in your "Modules" tab, then compare it to the version number listed on the Addons website (see below). If the numbers differ, proceed with the download and update.
    • To update you module: uninstall it and delete it from the PrestaShop administration, then copy the "/autoupgrade" folder from the module's archive (that you have downloaded from the Addons website) to the "/modules" folder of your installation of PrestaShop. Finally, install the module from the administration.
  • PrestaShop 1.5 and later versions: PrestaShop will automatically check the Addons site for new versions of your modules. If a new version is available, it will present display a new button "Upgrade!" button next to the "Install/Uninstall" button. Click to have PrestaShop download and update the module for you.

Simply follow the normal path usual steps to installing install a module on in PrestaShop:

  1. Download the 1-Click Upgrade module from PrestaShop Addons: http://addons.prestashop.com/en/administration-tools/5496-autoupgrade.html. Save the Zip file to on your desktop.
  2. In your PrestaShop administration panel, go to the "Modules" page of the "Modules" menu.
  3. Click on the "Add a module" button, located at the top right of located in the upper right part of the list of available modules.

    Tip

    If updating from version 1.4, click on the "Add a module from my computer" link, located at the top left.

  4. In the form that opens, click on the "Browse..." button, then find and select the module's Zip file that you just downloaded.
  5. Click the "Upload this Module" button. PrestaShop will put the module on your server, unzip it, and place the files in the /modules folder.

...

The module is now ready to configure and use.

The configuration

...

screen

The module's configuration screen is available from the "Modules" list, by clicking on the module's "Configure" link.

...

This process is explained in details in the "Making and restoring your own backup" chapter of this guide: http://doc.prestashop.com/display/PS16/Making+and+restoring+your+own+backup.

Image Added

Note that the 1-Click Upgrade module performs its own set of backup in order to allow for reverting of the whole upgrade. Nevertheless, you should rely on your own backups.

The pre-Upgrade checklist

The "The pre-Upgrade checklist" section gives you useful information on your current PrestaShop installation, and how it might interact with the automatic upgrade.

Image Added

You must make sure that all the checks are validated before you can launch the upgrade.

  • The 1-click upgrade module is up-to-date (your current version is x.x). Indicates whether you need to update the update module itself. If you have just installed it, there is little chance you will need to update it.
    If you do not have the latest version of the module, a button appears below this field, marked "Install the latest by clicking 'Add from my computer'". Clicking it takes you to the "Modules" page. From there, click on the "Add a module from my computer" link to reveal the pre-filled form. Click the "Download this module" button to start updating the module. Finally, go back to the 1-Click Upgrade configuration page to continue performing pre-upgrade checks.
  • Your store root directory is writeable (appropriate CHMOD permissions). Indicates if the read/write permissions are correctly set. If not, you will have to change them, using your FTP client, such as FileZilla.
    See the Getting Started guide's "System compatibility & system configuration" section for a quick explanation of how to perform a CHMOD.
  • The PHP "Safe mode" option is must be turned off.
  • The PHP "allow_url_fopen" option must be turned on or CURL must be installed.
  • You must put your store under maintenance. Indicates if your shop is active or in maintenance mode. You must put your shop in maintenance mode during the whole process (file backup, database backup, automatic upgrade, verification), so as to prevent customers from losing orders... and prevents you from losing clients. The module can disable your shop for you: Simply click on the "Click here to put your shop under maintenance" button. You can also choose to disable the shop yourself, using the shop's preference page:
    • PrestaShop 1.4: enable/disable the shop in the main "Preferences" tab.
    • PrestaShop 1.5 and later: enable/disable the shop in the "Maintenance" page, under the "Preferences" menu.
  • You de-activated or are not using must disable the Caching features of PrestaShop. Indicates whether your shop's cache is enabled or disabled. You must disable it during the whole process. The module will not do it for you.
    • PrestaShop 1.4: enable/disable the cache in the "Performances" page, under the "Preferences" tab.
    • PrestaShop 1.5 and later: enable/disable the cache in the "Performance" page, under the "Advanced parameters" menu.
  • The PHP time limit is high or disabled (Current value: xxx). The automatic upgrade can be a lengthy process, as it needs to download the archive from prestashop.com, unzip it on the server, replace the currently installed files, then trigger the update itself. Hence, the PHP settings might be too low, and break the upgrade altogether, mid-process at worse. In this field, PrestaShop gives you an indication of the current PHP settings. Ideally, it should indicate "disabled".

...

This section compares your version of PrestaShop with the latest stable one. You can quickly see whether you need to an update is required or not. If you know that there is a newer version more recent version available than the one presented, you can trigger a version check by clicking the "Check if a new version available" button.

Image Added

By default, the update tool is set to update your store to the next minor version. This means that if you use a version from the 1.4.x branch, it will not suggest the latest 1.6.x version, but rather the latest 1.4.x version. Therefore, if you want to update from a 1.4.x version to the latest 1.6.x version, you must click on the "More options (Expert mode)" button. This will open a new section, named "More options (expert mode)", where you can choose the distribution channel to which you want to update.
This is also very useful if you want to check for a version other than a stable one (for instance, beta, RC or any other unstable version).

...

This section enables you to pinpoint exactly the version to which version you want to upgrade your current PrestaShop installation.

Image Added

The options are:

  • Channel. Choose the distribution channel that you want to use. The recommended selection is "Minor releases", which means "any stable release above the current one". The other options are:
    • Major releases. The next stable releases from the latest branch: since the current branch is 1.6.x, the update tool would use the latest 1.6 version (as of this writing, v1.6.0).
    • Minor releases. This is the default setting. Uses only the next stable release within the current branch: if you have PrestaShop 1.4.2, it will update your shop to v1.4.9, even if v1.6.2 is available.
    • Release candidates. RC versions are deemed stable enough to be tested by the majority, but not stable enough to be the real release. Use them at your own risksrisk.
    • Beta releases, alpha releases. These are development versions. Use them at your own risksrisk.
    • Private release. Sometimes, the PrestaShop developers upload a private test version. If you have the right URL and hash key, you can update to this version easily using this channel. If you check Check the "Allow major upgrade" box , you indicate that if your are only interested in major releases.
    • Local archive. To be used if you have downloaded the version you want to upgrade to in the correct local folder, /admin/autoupgrade/download. Once you have selected selected an archive in the drop-down selector, indicate type the exact version number in the text field (be very exact!).
    • Local directory. To be used if you have downloaded and uncompressed the version you want to upgrade to in the /admin/autoupgrade/latest/prestashop folder. That /prestashop folder must come directly from the archive that you downloaded.
  • branch. Indicates if anything is available in the chosen channel.
  • name. The name of the latest version in the chosen channel.
  • url. The URL to the latest version in the chosen channel.
  • md5. The hash check for the latest version in the chosen channel.

...

For the curious, the numbered differences between your current version and the latest version in the chosen channel.

Image Added

In case you have make changes made changes directly to the core files instead of using the overriding possibilities of PrestaShop, these lists can help you know if your changes are safe or not.
Nevertheless, you can improve the lifespan of your custom code by turning it into overriding files. See the developer documentation for more information.

...

  • Backup my files and database. You must have your files backed-up, and the module will take care of this for you. You should never disable this setting, unless told to.
  • Backup my images. You should let the module take care of your images too, in order to be able to do a clean re-install again by re-uploading your files.

Image Added

Upgrade Options

These options enable you to have some control on the upgrade process:

  • Server performance. Some shared hosted offer poor performance, which might hinder the performance of the upgrade process, or even make it fail. "Low" is thus selected by default, but if you know you have a powerful server, you can choose "Medium" or even "High".
  • Disable non-native modules. It is recommended to choose "Yes" for this option, as some module might prove a hindrance when upgrading PrestaShop.
  • Upgrade the "default" theme. The upgrade process overwrites the default theme with its latest incarnation. If you have made changes to the theme directly, you can protect these changes by choosing "YesNo". As a reminder, it is NOT recommended to edit the default theme! You should make a copy of the theme, and make changes to that copy.
  • Upgrade the default e-mails. An update might bring new default e-mail templates. By default, the upgrade will replace the existing ones with the ones from the newer archive, and add the new templates. If you have customized your templates, it is recommended you keep them. You would then have to customize the new templates in order to fit the general style of your shop.
  • Step-by-step mode. Dev mode only. If enabled, the module will stop at each step to ask you for confirmation.
  • Display PHP errors. Dev mode only. If enabled, the module will displays PHP errors, which could help you discover server issues that would otherwise stay hidden from view.

Image Added

The Upgrade process

Once all the indicators in the "pre-Upgrade checklist" section are green, the update button appears in the "Start your Upgrade" section, along with the URL from which the new version will be downloaded.

...

You'll know the upgrade is over when the following message "upgrade complete. Please check your front - office theme is functional (try to make an order, check theme)" appears in green, along with the following final log entry: "End of process".
The upgrader also indicates that you should re-enable your shop, but before you do that, you should first check that everything is working in your back - office: no errors, all products and categories are in place with their images and attached files, etc. Until you have checked that everything is okay in your shop, it is better to keep it from the public eye.

...

Once you have made sure your PrestaShop installation is up and running, you can re-enable your shop using the option in the "Maintenance" page of the "Preferences" menu, then make tests on your front - office: browse products, sort them, try to order one, etc. In short, go through the entire buying process in order to make sure that you won't miss a sale.

Is everything working fine? Congratulations, you know have successfully upgraded your PrestaShop installation!

Warning
titleJavaScript error

In some server configurations, an error message might be displayed, saying "Javascript error (parseJSON) detected for action "upgradeNow". Starting restoration...".

Follow these steps to solve the error, :

  • Open your php.ini file and enable (uncomment) the MySQLi and MySQL PDO extensions. If you cannot access the php.ini file, contact your web host about this.
  • Open the /modules/autoupgrade/db/Db.php and find these lines (around line 210):

    Code Block
    public static function getClass()
    {
        $class = 'MySQL';
        /*if (PHP_VERSION_ID >= 50200 && extension_loaded('pdo_mysql'))
            $class = 'DbPDO';
        else if (extension_loaded('mysqli'))
            $class = 'DbMySQLi';*/
        return $class;
    }

    Simply uncomment these lines (remove /* and */). They should now look like this:

    Code Block
    public static function getClass()
    {
        $class = 'MySQL';
        if (PHP_VERSION_ID >= 50200 && extension_loaded('pdo_mysql'))
            $class = 'DbPDO';
        else if (extension_loaded('mysqli'))
            $class = 'DbMySQLi';
        return $class;
    }

After you have done all this, start the autoupgrade process again.

...