Table of content
Table of Contents | ||
---|---|---|
|
...
Manual update (experts only)
...
Tip | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Much of the presented process happens within the confines of a local web server, set up on your own computer. Before you do anything, download and install the local server package of your choice: WAMP, XAMPP, EasyPHP, MAMP, or another. If you have never installed a local server, read the "What you need to get started" chapter of the Getting Started guide, especially the "Installing PrestaShop on your computer" section. The steps of the upgrade process are:
You're done! Enjoy all the new features brought by this update! Step 1 – Save and Backup Your Current Store
Deactivating Your Store
Go to your store's back-office, open the "Maintenance" page under the "Preference" menu, 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 front-office of your store, while still making sure visitors cannot access the website. Backing Up Your FilesYou must back up all of the files related to your PrestaShop store, and store them on your computer. There are two main ways of backing up your files:
...or...
Backing Up Your DatabaseYou must absolutely back up the whole database for your PrestaShop store. There are three different ways to back up your database:
...or...
...or...
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 TranslationIf you did not edit the available translations or add new ones (either PrestaShop's or your modules'), please proceed to step 2. To save your translation changes:
Do this for all your custom languages, both those you created/added and those you modified/corrected.
Does the "prestashop-prod" folder contain...
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. |
...
/mails
. Has all the mails templates, including those that you have modified.
If you have never made any mail template modification, do not worry about this folder./img
. Contains your logo and all the pictures of your store (categories, products, etc.). Take good care of these specific files and folders:logo.jpg
- your store's logofavicon.ico
- your store's faviconlogo_stores.gif
- your store's logo for the Store Locator's map/c
- your categories' images/cms
- your CMS page's images/co
- your attributes textural colors/m
- your manufacturers' logos/p
- your products pictures/scenes
- your categories' image-maps/st
- your physical stores' photos/su
- your suppliers' logos- ...basically, copy all folders except
/img/admin
and/img/jquery-ui
.
/modules
. Only copy the modules that you have added since you installed PrestaShop for the first (and which where therefore not part of the default installation).- Some of these modules might not be currently enabled or even installed: it is up to you to determine whether they are still useful to you, and thus deserve to be copied to the updated installation.
- Also, do note that you will most probably have to update the modules that were not built with the new PrestaShop version in mind.
/themes/themeName
. Only copy your current theme.- If you use the default theme from PrestaShop (unchanged), do not copy its folder (
/themes/prestashop
): you must use the one from the new version (/themes/default
). - If you have made changes to the default theme, do copy its folder.
- If you use the default theme from PrestaShop (unchanged), do not copy its folder (
/download
and/upload
. 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
. In case you have added customized classes to this folder, copy them to the new/classes
folder.Warning When updating from a version below 1.4, you must manually edit these classes that you have customized. You do not have to edit classes that you didn't customize. In order to function properly with the latest version of PrestaShop, all these class files need to have their class name suffixed with "Core". Do not attempt these if you are not comfortable with PHP files.
Here is how to you should edit the customized files that you want to keep:- Copy the class files that you have customized into the
/classes
folder in "prestashop-prep". - Open each and every one of the class files, and find the ones where the class name is not
Core
-suffixed. If you are upgrading from PrestaShop 1.4.x, you shouldn't have any (except for custom classes). - Rename the class name, adding the "Core" suffix. For instance, "
MyClass
" becomes "MyClassCore
".
Only change the name in the PHP class within file, not the name of the file itself! - If all the files already have "Core" in their classname (such as "
class AttributeCore extends ObjectModel
"), then you do not need to change anything. - Save the edited files.
- Copy the class files that you have customized into the
/config
. You only have to copy one file, but it is essential: thesettings.inc.php
file./translations
- if you are using another language than the ones available in the default installation, you will have to copy that language's folder in the/translations
folder of the new installation. Failing that, the update will not work properly.
...
- Open the phpMyAdmin tool, which should be available on your local server. Most of the time, it is located at http://127.0.0.1/phpmyadmin, or sometimes http://127.0.0.1/mysql.
- If it is not already the case, create a new database especially for this project. Give it a distinctive name, like "prestashop_update" or even the database name for your production store, for instance.
If you have already created a database for a previous local update test, just delete all of its tables. - Open de database, and click on the "Import" tab, located at the top of the screen.
Click on the "Browse" button and select the backup
.sql
file from your production store, which should be in the "prestashop-prod" folder.
Check that the "Max." value displayed by phpMyAdmin is higher than the.sql
file's size. If not, you will have to edit your local server'sphp.ini
, particularly theupload_max_filesize
value, thepost_max_size
value or even thememory_limit
value as a last resort. This being done, restart the local Apache and MySQL servers in order to apply your modifications.Tip Instead of changing the server settings, you can also try compressing the
.sql
the file using a Zip tool, such as http://www.7-zip.org/. phpMyAdmin should accept.sql.zip
files, and will take care of uncompressing the file before importing the data.- Click on the "Go" button to import the SQL file's content.
...
It should begin with the following line:
Code Block |
---|
<action result="ok" error="">
|
...
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:
Code Block |
---|
<action result="fail" error="27" />
|
...