diff --git a/basics/keeping-up-to-date/_index.md b/basics/keeping-up-to-date/_index.md index 0bc27e3050..1c9f21e0e4 100644 --- a/basics/keeping-up-to-date/_index.md +++ b/basics/keeping-up-to-date/_index.md @@ -102,8 +102,8 @@ For a detailed step-by-step guide, refer to the Migration Documentation (link to ## Read more -- {{< page-link "9/basics/keeping-up-to-date/upgrade" >}} +- {{< page-link "9/basics/keeping-up-to-date/update" >}} - {{< page-link "9/basics/keeping-up-to-date/backup" >}} - {{< page-link "9/basics/keeping-up-to-date/migration" >}} -[1]: {{< relref "/9/basics/keeping-up-to-date/upgrade" >}} +[1]: {{< relref "/9/basics/keeping-up-to-date/update" >}} diff --git a/basics/keeping-up-to-date/backup.md b/basics/keeping-up-to-date/backup.md index 70cb8daf66..1dd4bd58b3 100644 --- a/basics/keeping-up-to-date/backup.md +++ b/basics/keeping-up-to-date/backup.md @@ -118,4 +118,4 @@ There are a lot of ways to connect to a MySQL server. Many different softwares a For your information, you can also automate your backup using the Update Assistant module. This module guides you through the configuration and execution of your backup before performing your update. You have two options: perform the backup directly from the [module interface in your Back-Office][1], or from the [associated Command-Line (CLI)][2]. [1]: {{< relref "/9/basics/keeping-up-to-date/use-autoupgrade-module" >}} -[2]: {{< relref "/9/basics/keeping-up-to-date/upgrade-module/upgrade-cli" >}} +[2]: {{< relref "/9/basics/keeping-up-to-date/update/upgrade-cli" >}} diff --git a/basics/keeping-up-to-date/update/_index.md b/basics/keeping-up-to-date/update/_index.md new file mode 100644 index 0000000000..0100ac9ae1 --- /dev/null +++ b/basics/keeping-up-to-date/update/_index.md @@ -0,0 +1,34 @@ +--- +menuTitle: Update +title: How to update PrestaShop +description: Everything you need to know to update your PrestaShop to the latest version +weight: 80 +aliases: + - /9/basics/keeping_up-to-date/update +--- + +# How to update PrestaShop + +This chapter describes several ways to complete an update of PrestaShop. + +## Update Assistant module - Update from the Back-Office interface + +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. + +## Update Assistant module - Update from the Command-Line (CLI) + +`Update Assistant` module is fully accessible through `cli`. You can read all the details here. + +## Support service + +Doing an update by yourself can be risky. If you feel uncomfortable with doing it on your own, you can find support on prestashop-project.org . + +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. + +Many agencies and freelancers in your area may also provide this kind of service. + +More information about support: PrestaShop project support page + +## Read more + +{{% children /%}} diff --git a/basics/keeping-up-to-date/upgrade-module/img/upgrade-process.png b/basics/keeping-up-to-date/update/img/upgrade-process.png similarity index 100% rename from basics/keeping-up-to-date/upgrade-module/img/upgrade-process.png rename to basics/keeping-up-to-date/update/img/upgrade-process.png diff --git a/basics/keeping-up-to-date/upgrade-module/post-restore-checklist.md b/basics/keeping-up-to-date/update/post-restore-checklist.md similarity index 85% rename from basics/keeping-up-to-date/upgrade-module/post-restore-checklist.md rename to basics/keeping-up-to-date/update/post-restore-checklist.md index 697a7618f6..659e1cd2c1 100644 --- a/basics/keeping-up-to-date/upgrade-module/post-restore-checklist.md +++ b/basics/keeping-up-to-date/update/post-restore-checklist.md @@ -2,7 +2,7 @@ title: Post-restore checklist weight: 60 aliases: - - /9/development/upgrade-module/post-restore-checklist + - /9/development/update/post-restore-checklist --- # Post-restore checklist diff --git a/basics/keeping-up-to-date/upgrade-module/post-update-checklist.md b/basics/keeping-up-to-date/update/post-update-checklist.md similarity index 90% rename from basics/keeping-up-to-date/upgrade-module/post-update-checklist.md rename to basics/keeping-up-to-date/update/post-update-checklist.md index 911f374f45..f715b559d4 100644 --- a/basics/keeping-up-to-date/upgrade-module/post-update-checklist.md +++ b/basics/keeping-up-to-date/update/post-update-checklist.md @@ -2,7 +2,7 @@ title: Post-update checklist weight: 50 aliases: - - /9/development/upgrade-module/post-update-checklist + - /9/development/update/post-update-checklist --- # Post-update checklist @@ -24,5 +24,5 @@ The following steps will be executed during the upgrade: - If something’s wrong, you can restore a backup with this module. Your backup is available at {admin}/autoupgrade/backup and can be restored either manually or via the [command line interface][1] - If you can't access your back office, try enabling the debug mode manually in config/defines.inc.php by setting _PS_MODE_DEV_ to true ([see the dedicated documentation][2]) -[1]: {{< relref "/9/basics/keeping-up-to-date/upgrade-module/upgrade-cli" >}} +[1]: {{< relref "/9/basics/keeping-up-to-date/update/upgrade-cli" >}} [2]: {{< relref "/9/development/configuration/configuring-prestashop#enabling-debug-mode" >}} diff --git a/basics/keeping-up-to-date/upgrade-module/upgrade-cli.md b/basics/keeping-up-to-date/update/upgrade-cli.md similarity index 93% rename from basics/keeping-up-to-date/upgrade-module/upgrade-cli.md rename to basics/keeping-up-to-date/update/upgrade-cli.md index e4b898680d..10a53120d8 100644 --- a/basics/keeping-up-to-date/upgrade-module/upgrade-cli.md +++ b/basics/keeping-up-to-date/update/upgrade-cli.md @@ -2,7 +2,7 @@ title: Upgrade CLI weight: 40 aliases: - - /9/development/upgrade-module/upgrade-cli + - /9/development/update/upgrade-cli --- # Module CLI @@ -23,8 +23,8 @@ The following parameters are mandatory: You can also use these parameters: -* **--channel**: Specify the [channel to use]({{< ref "/9/basics/keeping-up-to-date/upgrade-module/channels.md" >}}) -* **--action**: Specify the [step you want to start from]({{< ref "/9/basics/keeping-up-to-date/upgrade-module/upgrade-process-steps.md" >}}) (Default: `UpgradeNow`) +* **--channel**: Specify the channel to use +* **--action**: Specify the [step you want to start from]({{< ref "/9/basics/keeping-up-to-date/update/upgrade-process-steps.md" >}}) (Default: `UpgradeNow`) If you use default `action` parameter, it will run the full upgrade process. diff --git a/basics/keeping-up-to-date/upgrade-module/upgrade-module-internal-behavior.md b/basics/keeping-up-to-date/update/upgrade-module-internal-behavior.md similarity index 98% rename from basics/keeping-up-to-date/upgrade-module/upgrade-module-internal-behavior.md rename to basics/keeping-up-to-date/update/upgrade-module-internal-behavior.md index 3d1741f9d3..006d3e929a 100644 --- a/basics/keeping-up-to-date/upgrade-module/upgrade-module-internal-behavior.md +++ b/basics/keeping-up-to-date/update/upgrade-module-internal-behavior.md @@ -2,7 +2,7 @@ title: Upgrade Module internal behavior weight: 20 aliases: - - /9/development/upgrade-module/upgrade-module-internal-behavior + - /9/development/update/upgrade-module-internal-behavior --- # Upgrade module internal behavior diff --git a/basics/keeping-up-to-date/upgrade-module/upgrade-process-steps.md b/basics/keeping-up-to-date/update/upgrade-process-steps.md similarity index 99% rename from basics/keeping-up-to-date/upgrade-module/upgrade-process-steps.md rename to basics/keeping-up-to-date/update/upgrade-process-steps.md index f3ab05f391..5e694205fa 100644 --- a/basics/keeping-up-to-date/upgrade-module/upgrade-process-steps.md +++ b/basics/keeping-up-to-date/update/upgrade-process-steps.md @@ -2,7 +2,7 @@ title: Upgrade Process Steps weight: 30 aliases: - - /9/development/upgrade-module/ + - /9/development/update/ useMermaid: true --- diff --git a/basics/keeping-up-to-date/upgrade-module/_index.md b/basics/keeping-up-to-date/upgrade-module/_index.md deleted file mode 100644 index f833582c5e..0000000000 --- a/basics/keeping-up-to-date/upgrade-module/_index.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -title: Upgrade Module -weight: 80 -aliases: - - /9/development/upgrade-module/ ---- - -# Upgrade module - -Also known as the "Autoupgrade module" or the "1-click upgrade module", PrestaShop upgrade assistant aims to automatize the upgrade process. - -Details on how to use the web interface are documented in [Keep up-to-date: Upgrade Assistant page]({{< ref "/9/basics/keeping-up-to-date/use-autoupgrade-module.md" >}}). - -{{% children /%}} - -## How to download it - -You can download it from [the module GitHub repository](https://github.com/PrestaShop/autoupgrade/releases) or from your shop administration panel. \ No newline at end of file diff --git a/basics/keeping-up-to-date/upgrade-module/channels.md b/basics/keeping-up-to-date/upgrade-module/channels.md deleted file mode 100644 index ea6cec13d6..0000000000 --- a/basics/keeping-up-to-date/upgrade-module/channels.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: Upgrade channels -weight: 40 -aliases: - - /9/development/upgrade-module/channels ---- - -# Upgrade channels - -Different channels are available for upgrade. - -Depending on the channel, the archive that will be used to upgrade the shop will be different. - -### Major - -This channel will look at the latest version, even if it is a different major version. - -### Minor - -This channel will look at the latest version of the same major version. - -### RC - -This channel is currently disabled. This was done to avoid people getting stuck on pre release software of which they cannot upgrade later. - -### Beta - -This channel is currently disabled. This was done to avoid people getting stuck on pre release software of which they cannot upgrade later. - -### Alpha - -This channel is currently disabled. This was done to avoid people getting stuck on pre release software of which they cannot upgrade later. - -### Private - -This channel allows you to fetch a version from a custom link instead of the official PrestaShop source. - -### Archive - -This channel will not fetch available versions data from PrestaShop API but will look at a `prestashop.zip` file inside your `/autoupgrade/download` folder. - -### Directory - -This channel will not fetch available versions data from PrestaShop API but will look at directory content `//autoupgrade/latest/` diff --git a/basics/keeping-up-to-date/upgrade.md b/basics/keeping-up-to-date/upgrade.md deleted file mode 100644 index 9155f7cc58..0000000000 --- a/basics/keeping-up-to-date/upgrade.md +++ /dev/null @@ -1,210 +0,0 @@ ---- -menuTitle: Upgrade -title: How to upgrade PrestaShop -description: Everything you need to know to upgrade your PrestaShop to the latest version -weight: 30 ---- - -# How to upgrade PrestaShop - -{{% notice warning %}} -**Important** - -Do not go further if you haven’t made a backup of your shop. -Rollback will be the only way to go back if something does not go well, and this requires a backup. -Learn [how to backup your shop]({{< ref "/9/basics/keeping-up-to-date/backup" >}}) -{{% /notice %}} - -There are a few ways of upgrading the PrestaShop store. This chapter provides information about two methods of getting the software to the latest version. - -## 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 "/9/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 "/9/basics/keeping-up-to-date/upgrade-module/upgrade-cli" >}}). - -## Manual upgrade - -{{% notice warning %}} -**Important** - -Manual upgrade without `autoupgrade` module is not possible at the moment. We recommend using [cli]({{< ref "/9/basics/keeping-up-to-date/upgrade-module/upgrade-cli" >}}) -mechanism from the upgrade assistant module. -{{% /notice %}} - -### Release download - -The first step is to download the latest version on https://github.com/PrestaShop/PrestaShop/releases. - -Download can also be done in command line, as done here with the version 8.0.2: - -```bash -wget -O prestashop-upgrade.zip https://github.com/PrestaShop/PrestaShop/releases/download/8.0.2/prestashop_8.0.2.zip -``` - -### Archive extraction - -Extract the files from the archive with a tool like 7zip - -Note starting from PrestaShop 1.7.0.0, the release package contains a 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 -``` - -If asked to overwrite the index.php file, answer yes. -Once you have the folders like `classes/`, `modules/`, `themes/`, etc. you may go on the next step. - -### Sample files cleanup - -Avoid overwrite the production resources (images, conf ...) with the default data. These files and folders can be removed from the new release: - -- prestashop-upgrade.zip -- prestashop.zip -- img/ -- override/ -- install/ -- modules/ - -{{% notice warning %}} -All the other files present in the new release will overwrite the existing files. -All changes you made on the original source code will be lost (this is not recommended, you should never modify the core files). -{{% /notice %}} - -Also, rename the “admin” folder to match your shop’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. - -This can be done in your administration panel: - -- On PrestaShop >= 1.7, in Shop parameters > General > Maintenance tab - -Adding your IP address will allow you to access your shop 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. - -### Disable cache - -You may have activated a caching system (e.g. 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. - -{{% notice warning %}} -**Note about `vendor` folder**: Previous upgrades 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. - -```bash -rm -rf vendor/ -``` - -{{% /notice %}} - -On Windows, copy the new folder content and paste it in your shop folder. -You will get warnings that files already exists in the destination folder. Choose “overwrite” to continue. - -On linux, the copy can be done in your terminal: - -```bash -cp -R /* / -``` - -Example: - -```bash -cp -R ~/Downloads/prestashop/* /var/www/html/ -``` - -### Database upgrade - -Once the files have been copied, your shop database is ready to be upgraded. - -{{% 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. -{{% /notice %}} - -The database migration scripts are stored in the `autoupgrade` module. If not present in your modules folder, download it and unzip it there. - -Upgrading the database is a step of the process ran by the upgrade module. It can be independantly triggered from the command line even if the module is uninstalled: - -```bash -php modules/autoupgrade/cli-upgrade.php --dir= --channel=private --action=upgradeDb -``` - -Example: -```bash -php modules/autoupgrade/cli-upgrade.php --dir=admin-dev --channel=private --action=upgradeDb -``` - -The minimal store context will be loaded, and SQL requests will be triggered. - -SQL requests that encountered an error will be displayed on the log with additional details which can help you understand, fix the issue then re-execute the request manually on your database. In some cases, you may need to restore your database backup and start over. - -If successful, a command will be given to run the next step, but can be safely ignored as you did not trigger the whole upgrade process from the module. - -#### Execution log - - -``` -INFO - === Step upgradeDb -INFO - Cleaning file cache -INFO - Running opcache_reset -INFO - Initializing required environment constants -INFO - Checking version validity -INFO - Checking connection to database -INFO - Disabling all non native modules -INFO - Updating database data and structure -WARNING - -
- [WARNING] SQL 8.0.0 - 1060 in ALTER TABLE `ps_tab` ADD route_name VARCHAR(256) DEFAULT NULL: Duplicate column name 'route_name'
-INFO - Running generic queries -INFO - Database upgrade OK -INFO - Upgrading languages -INFO - Regenerating htaccess -INFO - Cleaning XML files -INFO - Keeping overrides in place -INFO - Keeping current theme -INFO - Cleaning file cache -INFO - Running opcache_reset -INFO - Database upgrade completed -INFO - Database upgraded. Now upgrading your Addons modules... -INFO - Restart requested. Please run the following command to continue your upgrade: -[...] -``` - - -### 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. - -### Modules upgrade - -Your modules files have been upgraded 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 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.7, this page can be found in the Improve >> Modules page, under the tab "Updates": - -{{< figure src="../img/image38.png" >}} - -## Support service - -Doing an upgrade by yourself can be risky. If you feel uncomfortable with doing it on your own, you can find support on [prestashop-project.org](https://www.prestashop-project.org/support/). - -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. - -Many agencies and freelancers in your area may also provide this kind of service. - -More information about support: [PrestaShop project support page](https://www.prestashop-project.org/support/) diff --git a/basics/keeping-up-to-date/use-autoupgrade-module.md b/basics/keeping-up-to-date/use-autoupgrade-module.md index 546ab3a4c0..235f78cd91 100644 --- a/basics/keeping-up-to-date/use-autoupgrade-module.md +++ b/basics/keeping-up-to-date/use-autoupgrade-module.md @@ -1,58 +1,7 @@ --- -menuTitle: Use the Update Assistant -title: How to use the Update Assistant -weight: 40 ---- - -# How to upgrade PrestaShop using the Update Assistant - -Also known as the "Autoupgrade module" or the "1-click upgrade module", PrestaShop Update Assistant aims to automatize the upgrade process. - -It is available from your shop administration panel. It executes the [upgrade process]({{< ref "/9/basics/keeping-up-to-date/upgrade.md" >}}) automatically, and is available for almost all versions of PrestaShop. - -{{% notice note %}} -The same note as above, in order to have this module working you must have set in `/app/config/parameters.php` database account with full privileges. -{{% /notice %}} - -{{% notice note %}} -Since version 4.15, only upgrades from PS 1.7.x to PS 8.y versions are supported by the module. -If you upgrade from a version older than 1.7, please use a previous version of this module (v4.14.3 and less) and refer to [previous major version upgrade guide]({{< ref "/1.7/basics/keeping-up-to-date/_index.md" >}}). -{{% /notice %}} - -## Download / Installation - -- Download the latest release from GitHub https://github.com/PrestaShop/autoupgrade/releases - -Then, import your module archive on the modules page. To do so, you can find the button “Upload a module” (PrestaShop >= 1.7.x) at the top right of the page. Clicking on it will open a form that will allow you to upload your module zip. - -{{< figure src="../img/image70.png" >}} - -- From the administration panel - -{{< figure src="../img/image33.png" >}} - -## Usage - -The configuration page of the module displays some checks and the options available for an upgrade. - -{{< figure src="../img/image61.png" >}} - -The first configuration lets you choose what kind of upgrade you want to run. It is always recommended to stick with the minor / major branches of the options, as they use some additional information provided by PrestaShop (md5 checksum, core files to delete...). - -{{< figure src="../img/image30.png" >}} - -It is always recommended to let the module make its own backup, because it will allow it to immediately run a rollback if something goes wrong during the upgrade. - -However, if you are confident in the backup you have made and are ready to rollback manually in case of trouble, you can disable the backup step. - -{{< figure src="../img/image26.png" >}} - -Finally, the last options customizing the upgrade process let you keep any changes you have done to the default theme, mails etc. - -{{< figure src="../img/image62.png" >}} - -If the configuration chosen and the self-checks are valid, a button “Upgrade Now” will be available. Clicking immediately start the upgrade. - -Note the interface may be unfriendly to you, but it displays as much information as possible to let you know what happened in case of trouble. Let the process run until the message “Upgrade successful” appears. - -If an error is found, you will be given the choice to rollback. +# this page is redirected so it has no content +layout: redirect +redirect: /9/basics/keeping-up-to-date/update +_build: + list: never +--- \ No newline at end of file diff --git a/faq/upgrade.md b/faq/upgrade.md index 17412784ab..0e01bdabab 100644 --- a/faq/upgrade.md +++ b/faq/upgrade.md @@ -40,5 +40,3 @@ In order to find out what exactly went wrong, you need to check the upgrade proc **A:** In PrestaShop, `PS_VERSION_DB` is a constant that holds the current version number of your PrestaShop database schema. The main purpose of `PS_VERSION_DB` is to keep track of the database schema's version history. When you upgrade a shop, the database schema is modified to match the structure of the new version (e.g. add or remove tables, columns, or relationships). Before upgrading PrestaShop, the upgrade module relies on this constant to ensure that the current version matches the database schema. If the values don't match, it would be a sign of potential issues with the database structure or data which could lead to unforeseen consequences during the upgrade process. - -To resolve this issue, run the database upgrade step as explained in [the upgrade page]({{< ref "/9/basics/keeping-up-to-date/upgrade#database-upgrade" >}}).