Child pages
  • Manual update

Versions Compared

Key

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

...

Table of Contents
maxLevel3

...

2

Warning

THIS METHOD IS NOW OBSOLETE.
PLEASE USE THE FREE 1-CLICK UPGRADE MODULE INSTEAD.

Read the documentation for the automatic upgrade, which is the only one that is officially recommended.

Manual update

Doing a manual update is a long and detailed process, which should only be used out of necessity – for instance, if you cannot make an automatic update.

...

From the start of the process, your online shop should be disabled (in "maintenance" mode") so as to make sure that your clients will not lose their carts and orders during the update process. In effect, this means that your shop will be closed for business during the whole process (one to two hours).

Quick instructions

This short section is aimed at those who are already familiar with installing and updating PHP/MySQL web applications on a server. Should you not feel comfortable with the lack of details, you will find detailed instructions in the sections following this one.

...

You're done! Enjoy all the new features brought by this update!

Step 1 – Save and Backup Your Current Store

Warning
titleCaution

Not backing up your store constitutes a very important risk if you encounter any difficulties with the upgrade. You could lose your data and never be able to recover it.

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.

Deactivating Your Store

Warning
titleCaution

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 to a backup, however recent, you won't have lost any unfinished carts or orders.

...

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 front-office of your store, while still making sure visitors cannot access the website.
In order to find out your IP address, visit this page: http://whatismyipaddress.com/

Backing Up Your Files

You must back up all of the files related to your PrestaShop store, and store them on your computer.

...

  • Copy all of your files from your server to your local computer using an FTP client.
    This method is only possible if your hosting provider has provided you with an FTP access to your server. Create a "prestashop-prod" folder on the Desktop of your computer, then, using an FTP client (such as the free FileZilla client, which you can download at http://filezilla-project.org/), select all the PrestaShop files and folders on your server (use the Ctrl-A command) and copy them to that local "prestashop-prod" folder.

Backing Up Your Database

You must absolutely back up the whole database for your PrestaShop store.

...

Keep that backup in the "prestashop-prod" folder on your computer, which you should have created in the previous step and should contain your files.

Backing up Your Customized Translation

If you did not edit the available translations or add new ones (either PrestaShop's or your modules'), please proceed to step 2.

...

Tip
titleVerify your backup folder

Does the "prestashop-prod" folder contain...

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

You have checked the entire backup folder, 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.

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, fill in the form then validate).

...

In that "/prestashop-prep" folder, select the "/admin" folder and give it the same name as the administration folder of your production store. For instance, if you're "prestashop-prod" uses the name admin123, give that same name to the /admin folder in your "prestashop-prep" folder.

Copying the files that were backed up in "prestashop-prod" to the new "prestashop-prep" folder

Now comes the part where you will copy the files that are unique to your production shop into the folders of the new version. In practice, the idea is to build a "prestashop-prep" folder that would contain both the latest version of the standard files for PrestaShop, and all the files that you created and put online since you installed PrestaShop: images, logos, pictures, translations, modules, etc.
This is an important step, because it enables you to safe-keep all the customizations from your store. Take the time to follow these instructions.

...

Your "prestashop-prep" folder is now ready. You are not to touch it again, and will only work using a copy of it from now on.

Moving the "prestashop-prep" folder to your local server

The "prestashop-prep" folder, which you initially unzipped from the archive of the latest PrestaShop version, now contains all of your customizations from the "prestashop-prod" folder (and therefore, from your shop, which is currently running online – and should still be in maintenance mode). In this next step, you will copy this folder to your local web server, in order to test that the update does run without any issue.

...

Put the "prestashop-prep" at the root of the web folder of your local web server.

Recreating the production database locally

The local files should now be up to date, but the database also needs to be updated. This is what the update script is for. It is part of the files from the new PrestaShop 1.5 version.

...

PrestaShop can now access your production database on your local server, all you have to do is to start the update script.

Checking everything before going any further

Did you follow these steps?

...

If you did do all that, then you can continue to Step 3.

Step 3 – Starting the Update

Launching the update script

Visit your store's update script URL; for instance: http://127.0.0.1/prestashop-prep/install/upgrade/upgrade.php (Replace "prestashop-prep" with the actual name of the folder that you have copied in your local server's web folder).

...

For the most part, the update script takes care of updating the SQL database, which can prove a very arduous task in itself. It also handles the update of the config/settings.inc.php configuration file, depending on your configuration and environment, as well as other aspects of PrestaShop's inner working.

Finishing the local update

Once the update is finished, a XML file should be displayed in your browser. This is expected, but can surprise you, since it doesn't look like any regular web page, and each browser has its own way of displaying it. For instance, Firefox will first display a warning message, "This XML file does not appear to have any style information associated with it. The document tree is shown below", above the content of the XML file itself. This will be improved in later versions of the script.

...

Now go to your store's administration page, using your customized /admin folder name. You will have to log in using your usual credentials. Browse through the various administration page and check if the content is indeed there and that all the back-office pages do work, then take the store out of maintenance mode in order to explore the front-office pages the way a regular visitor would, and make sure that they all work.

If the update fails

All of the updates do not run smoothly, and for very different reasons. In order to help you, the update script displays an error code at the beginning of the XML result. In case of an error, the page starts like so:

...

  • Delete all the files from the local web folder, and replace them with those from the "prestashop-prep" folder, which are pristine because they were kept untouched.
  • Delete all the tables from the test database, and replace them with those from the original installation.

Step 4 - QA and Testing

Import your Translations

If you did export your custom translations during step 1 (Backups), import them back into your new store by going to the "Localization" menu, then the "Translations" page, then use the "Import a language pack manually" section.

Tests to be done on your local test store

To make sure that everything is working properly on your updated local store, you should perform a few tests:

...

If every test is successful, congratulations! Proceed to step 5.

Step 5 - Starting the Update on your production store

Now that you've reached this stage, you should have succeeded in updating your shop on your local server. In doing so, you get a better guarantee that performing the update on your web hosting will go smoothly. Your "prestashop-prep" folder contains all the necessary files, because you have changed its content based on issues noticed during your tests from the previous step.

...

  1. Using your FTP client, replace the files in your online store with those from your "prestashop-prep" folder.
    You should have nothing to worry about, because all your files have been backed up at the beginning of the process in the "prestashop-prod" folder, so you can return to this backup at any time. Ditto for your database, which has also been saved in the "prestashop-prod" folder as .sql file.
  2. Run the update script on your production shop, by accessing it using your browser. In version 1.5, the script is located at /install/upgrade/upgrade.php.
  3. Check all settings before updating: Follow the on-screen instructions and make sure that your server meets the technical requirements of the new version.
  4. End of update: Once the update is complete, remove the /install and browse your front-office and your back-office to make sure everything works.

Step 6 - QA and Testing

You need to again perform all the tests already carried out locally, to ensure that nothing fails despite the change from a local environment to a production environment.

Import your translations

If you did export your custom translations during step 1 (Backups), import them back into your new store by going to the "Localization" menu, then the "Translations" page, then use the "Import a language pack manually" section.

Check the main Domain Name

You should verify that the domain name assigned in the database is indeed the one that you are working with. To do so, visit the "Preferences" menu, then the "SEO & URLs" page.

...

Info

As you can see, the address and path to your store are no longer stored in the /config/settings.inc.php file from version 1.5, but in the database.

Therefore, you can open the /config/settings.inc.php and delete the define('_PS_BASE_URI_', '/le_chemin_de_la_boutique/'); if the update hasn't taken care of that.

Tests to perform on your updated production store

You must make sure that everything is working properly on your update store. These are a few tests to perform:

...

If every test is successful, congratulations!

Step 7 - Activating your store

Great! You are now at the end of the update process!

...