Skip to content

Commit

Permalink
Improve update page
Browse files Browse the repository at this point in the history
  • Loading branch information
M0rgan01 committed Feb 12, 2025
1 parent 9b2fdda commit dd9181d
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 178 deletions.
8 changes: 4 additions & 4 deletions basics/keeping-up-to-date/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ This stability is guaranteed by the <a href="https://semver.org/" target="_blank

For a detailed step-by-step guide, refer to the official documentation for the [Update Assistant module][1].


### Migrating PrestaShop

![Migration schema](img/migration-schema.png)
Expand Down Expand Up @@ -99,12 +98,13 @@ A successful migration follows these steps:
3. **Adapt** the data to meet compatibility requirements.
4. **Import** the data into the new store.

For a detailed step-by-step guide, refer to the Migration Documentation (link to migration page).
For a detailed step-by-step guide, refer to the [Migration Documentation][2].

## Read more

- {{< page-link "1.7/basics/keeping-up-to-date/upgrade" >}}
- {{< page-link "1.7/basics/keeping-up-to-date/update" >}}
- {{< page-link "1.7/basics/keeping-up-to-date/backup" >}}
- {{< page-link "1.7/basics/keeping-up-to-date/migration" >}}

[1]: {{< relref "/1.7/basics/keeping-up-to-date/upgrade" >}}
[1]: {{< relref "/1.7/basics/keeping-up-to-date/update" >}}
[2]: {{< relref "/1.7/basics/keeping-up-to-date/migration" >}}
Original file line number Diff line number Diff line change
@@ -1,59 +1,46 @@
---
menuTitle: Upgrade
title: How to upgrade PrestaShop
description: Everything you need to know to upgrade your PrestaShop to the latest version
menuTitle: Update
title: How to update PrestaShop
description: Everything you need to know to update your PrestaShop to the latest version
weight: 30
aliases:
- /1.7/basics/keeping_up-to-date/upgrade
- /1.7/basics/keeping_up-to-date/update
---

# How to upgrade PrestaShop
# How to update PrestaShop

This chapter describes several ways to complete an update of PrestaShop.

{{% notice warning %}}
**Important**
## Update Assistant module - Update from the Back-Office interface
<!--TODO create link 'here' when Update from the Back-Office is ready-->
You can use provided `Update Assistant` module to update your store to the newest version using web interface. You can read more about the module and how to use it here.

Do not go further if you haven’t made a backup of your shop.
## Update Assistant module - Update from the Command-Line (CLI)
<!--TODO create link 'here' when Update from the Command-Line is ready-->
`Update Assistant` module is fully accessible through `cli`. You can read all the details here.

Rollback will be the only way to go back if something does not go well,
and this requires a backup.
## Manual update – Process details

Learn [how to backup your shop]({{< ref "/1.7/basics/keeping-up-to-date/backup" >}})
{{% /notice %}}

This chapter describes several ways to complete an upgrade of
PrestaShop.

## Upgrade assistant module (formerly 1-click upgrade module)

You can use provided `autoupgrade` module to upgrade your store to the newest version using web interface. You can read more about the module and how to use it [here]({{< ref "/1.7/basics/keeping-up-to-date/use-autoupgrade-module" >}}).

## Upgrade assistant module (formerly 1-click upgrade module) - CLI method

Upgrade assistant module (autoupgrade) is fully accessible through `cli`. You can read all the details [here]({{< ref "/1.7/basics/keeping-up-to-date/upgrade-module/upgrade-cli" >}}).

## Manual upgrade – Process details

This guide gives you the full control on the process. This one has been applied by PrestaShop for several major versions, and thus can be applied on very old shops.
This guide gives you the full control on the process. This one has been applied by PrestaShop for several major versions, and thus can be applied on very old stores.

{{% notice info %}}
Warning, the manual method described below only works for updates from a PrestaShop 1.7.0 store to a PrestaShop 1.7.8 one.
Wrong use of this method may render the update and the operation of your store impossible.
Wrong use of this method may render the update and the operation of your store impossible.
We recommend that you use the web interface or CLI of the Autoupgrade module.
{{% /notice %}}

### Release download

The first step is to download the latest version on https://www.prestashop.com/.
The first step is to download the latest version on <a href="https://www.prestashop.com/" target="_blank">prestashop.com</a>.

If you upgrade to another version of PrestaShop 1.6, the release files
can be found in a [dedicated archives list](https://www.prestashop.com/en/previous-versions?version=1.6).
If you update to another version of PrestaShop 1.6, the release files
can be found in a <a href="https://www.prestashop.com/en/previous-versions?version=1.6" target="_blank">dedicated archives list</a>.

Download can also be done in command line, as done here with the version
1.7.8.11:

```bash
wget -O prestashop-upgrade.zip https://github.com/PrestaShop/PrestaShop/releases/download/1.7.8.11/prestashop_1.7.8.11.zip
wget -O prestashop-update.zip https://github.com/PrestaShop/PrestaShop/releases/download/1.7.8.11/prestashop_1.7.8.11.zip
```

### Archive extraction
Expand All @@ -66,10 +53,10 @@ zip file itself, which must be extracted as well.
On a Linux terminal, you can use the command \`unzip\`:

```bash
unzip prestashop-upgrade.zip && unzip prestashop.zip -d upgrade
unzip prestashop-update.zip && unzip prestashop.zip -d update
```

Once you have the folders like `classes/`, `modules/`, `themes/` inside the upgrade-directory, etc. you may
Once you have the folders like `classes/`, `modules/`, `themes/` inside the update-directory, etc. you may
go on the next step.

### Sample files cleanup
Expand All @@ -85,38 +72,38 @@ existing files. All changes you made on the original source code will be
lost (by the way, this is not recommended, you should never modify the
core files).

Also, rename the “admin” folder to match your shop’s admin folder name.
Also, rename the “admin” folder to match your store’s admin folder name.
This will prevent an unwanted duplication of the administration content.

### Turning on maintenance mode

The shop will now be modified. As it may cause unexpected behavior for you and your customers during the upgrade, we highly recommend you to
turn on maintenance mode during the upgrade.
The store will now be modified. As it may cause unexpected behavior for you and your customers during the update, we highly recommend you to
turn on maintenance mode during the update.

This can be done in your administration panel:

- On PrestaShop 1.7, in Shop parameters > General > Maintenance tab
- On PrestaShop 1.6, in Shop parameters > Maintenance

Adding your IP address will allow you to access your shop while it’s in
Adding your IP address will allow you to access your store while it’s in
maintenance mode. That way, you can make sure everything is working
right before allowing your customers to access it again.

### File copy

In this step, we "upgrade" the PrestaShop files by copying the new
release content in the existing shop.
In this step, we "update" the PrestaShop files by copying the new
release content in the existing store.

### Disable cache

You may have activated a caching system (eg. memcache) on your shop. In that case, make sure to disable it in "Advanced Parameters" > "Performance". You can enable it again once the upgrade process is done. You might want to also delete the `var/cache/prod` and `var/cache/dev` folders.
You may have activated a caching system (eg. memcache) on your store. In that case, make sure to disable it in "Advanced Parameters" > "Performance". You can enable it again once the update process is done. You might want to also delete the `var/cache/prod` and `var/cache/dev` folders.

**Note about `vendor` folder**: Previous upgrades of PrestaShop 1.7
**Note about `vendor` folder**: Previous updates of PrestaShop 1.7
showed that conflicts may occur when merging the new vendor/ folder with
the old one. To avoid this problem, we recommend to delete this folder
in the existing shop before copying the new one.
in the existing store before copying the new one.

On Windows, copy the new folder content and paste it in your shop
On Windows, copy the new folder content and paste it in your store
folder. You will get warnings that files already exists in the
destination folder. Choose “overwrite” to continue.

Expand All @@ -132,13 +119,13 @@ Example:
cp -rf ~/Downloads/prestashop/* /var/www/html/
```

### Database upgrade
### Database update

Once the files have been copied, your shop database is ready to be
upgraded.
Once the files have been copied, your store database is ready to be
updated.

{{% notice note %}}
Some web hosting providers gives you two user accounts to access your database. One with full privileges the other for using in scripts with limited rights. To be able to use this Database upgrade script you have to use the account with full privileges.
Some web hosting providers gives you two user accounts to access your database. One with full privileges the other for using in scripts with limited rights. To be able to use this Database update script you have to use the account with full privileges.
{{% /notice %}}

All the changes to apply have been defined in the `install` folder,
Expand All @@ -163,7 +150,7 @@ the attribute `result` of the first tag `<action>`:

#### Execution log

When the upgrade script found some upgrades to apply, the SQL queries
When the update script found some updates to apply, the SQL queries
run will be listed along their respective result.

```xml
Expand All @@ -185,38 +172,38 @@ some cases, you may need to restore your database backup and start over.
An error code can also be displayed. Each code is related to a message
described here:

* Error #27: The shop is running a newer version than the content provided by the install folder.
* Error #28: The shop is already at the version you try to upgrade to.
* Error #27: The store is running a newer version than the content provided by the install folder.
* Error #28: The store is already at the version you try to update to.
* Error #29: Could not find the current version. Check your database parameters file and the database connection.
* Error #31: Unable to find upgrade directory in the installation path, does the folder `install/upgrade/sql` exist and is not empty?
* Error #32: No upgrade needs to be applied.
* Error #33: Error while loading a SQL upgrade file. Check your permissions of the folder `install/upgrade/sql`.
* Error #31: Unable to find update directory in the installation path, does the folder `install/upgrade/sql` exist and is not empty?
* Error #32: No update needs to be applied.
* Error #33: Error while loading a SQL update file. Check your permissions of the folder `install/upgrade/sql`.
* Error #40: The version provided in the file `install/install_version.php` is invalid.
* Error #43: Error while upgrading database schema using doctrine.
* Error #43: Error while updating database schema using doctrine.
* Error #44: Error while updating translations.
* Error #45: Error while enabling theme.

### Cleanup

Before going further, a few things should now be cleaned.

- The `install` folder, used to run the database upgrades, is not needed anymore and can be safely deleted.
- When opening your shop (in the front or back office) on your browser, you may see some visual issues. This can be due to your old assets being still served by a cache.
Reload them by force-refreshing the page (press ctrl+R on Windows / Linux or cmd+R on Mac OS) or clearing your browser’s cache.
- The `install` folder, used to run the database updates, is not needed anymore and can be safely deleted.
- When opening your store (in the front or back office) on your browser, you may see some visual issues. This can be due to your old assets being still served by a cache.
Reload them by force-refreshing the page (press ctrl+R on Windows / Linux or cmd+R on Mac OS) or clearing your browser’s cache.

### Modules upgrade
### Modules update

Your modules files have been upgraded during the file copy, however many
Your modules files have been updated during the file copy, however many
of them may require additional changes on the database. Please check the
module page in your Back Office to see if upgrades are waiting to be
module page in your Back Office to see if updates are waiting to be
run.

Go to your administration panel and login. You will notice the version
displayed has changed on the login page. Then in the menu, click on the
module page to reach your catalog.

On PrestaShop 1.6, this page can be found in “Module & Services”. Click
on “Update all” at the top of the page to run all available upgrades:
on “Update all” at the top of the page to run all available updates:

{{< figure src="../img/image63.png" >}}

Expand All @@ -225,26 +212,12 @@ Modules page, under the tab “Notifications”:

{{< figure src="../img/image38.png" >}}

## 1-click upgrade module

If the manual process seems too tedious, other solutions exist to complete an upgrade.

PrestaShop provides the module 1-click upgrade for free on the marketplace and your shop administration panel. It executes the previously given process automatically, and is available for almost all versions of PrestaShop.

You can read more about it [here]({{< ref "/1.7/basics/keeping-up-to-date/use-autoupgrade-module" >}}).

## Support service

Doing an upgrade by yourself can be risky. If you feel uncomfortable
with doing it on your own, you can leave it to our support team who will
handle the backup and the upgrade to the last **minor** version for you
(1.6 → 1.6, 1.7 → 1.7 etc.).
Doing an update by yourself can be risky. If you feel uncomfortable with doing it on your own, you can find support on <a href="https://www.prestashop-project.org/support/" target="_blank">prestashop-project.org </a>.

Basically, the process and the result will be the same. The existing
data on the shop will be kept, as well as your module and your current
theme.
Basically, the process and the result will be the same. The existing data on the store will be kept, as well as your module and your current theme.

You can [subscribe for the upgrade service on the marketplace](https://addons.prestashop.com/en/support/18689-upgrade-pack-prestashop.html).
Many agencies and freelancers in your area may also provide this kind of service.

Many agencies and freelancers in your area may also provide this kind of
service.
More information about support: <a href="https://www.prestashop-project.org/support/" target="_blank">PrestaShop project support page</a>
18 changes: 0 additions & 18 deletions basics/keeping-up-to-date/upgrade-module/_index.md

This file was deleted.

76 changes: 0 additions & 76 deletions basics/keeping-up-to-date/use-autoupgrade-module.md

This file was deleted.

0 comments on commit dd9181d

Please sign in to comment.