You are currently viewing the article on an older Shopware version!

Updating Shopware

Create a test environment

We recommend that you create a test environment so that you can test a Shopware update in your environment in advance. You can find out exactly how to set this up here.

Secure your update

If you have not created a test environment, always create a backup so that you can easily resume operation in the event of problems! We also recommend that you always create a backup before updating the live system, even if this was previously checked in the test system.

Note that Shopware itself does not create backups. You should set these up separately on your server. If you have hosted your server with a hosting partner, they will usually take care of creating the backups. In case of doubt, you should contact the hosting partner.

Please note that the System requirements have changed, the system requirements for 6.4.0.0 can be found here.

Extension compatibility - IMPORTANT

Before updating, take care that all of your installed extensions are up-to-date and compatible with the new Shopware version, otherwise your shop may have problems at updating and you have to recover it from your backup. Whether or not your extensions are compatible can be checked in our Store, in the Auto-Updater in the admin or in your Shopware Account at Licenses.

Update by Browser

Step 1: Unzip and upload

Unzip the update archive and copy all files by FTP to your Shopware directory on your server - overwrite all existing Shopware files.

Alternatively you can upload and unzip the zip file through your hoster's control panel. This is usually much faster.

Only use the "Update Package" from the Changelog Site!

Step 2: Maintenance page

After you successfully uploaded the files a maintenance page will be displayed automatically:

Now open the updater: http(s)://www.your-shop.com/recovery/update/index.php

Step 3: Execute the update in browser

Follow the update instructions. If you update a shop with a large amount of data, the database migration step may take a while to process.

Step 4: Completing update

If the maintenance mode is still active after the update process has been completed, you must remove the /update-assets folder from the installation directory. However, if the permissions on your server are set correctly, this should happen automatically.

Step 5: Delete browser cache

Before you open the Admin, please delete your browser cache (cache & offline website data).

Step 6: Delete shop cache

Call the storefront and check the functionality - If you encounter problems here, delete the following folders in the installation directory of Shopware:

/var/cache/prod_xxxxxxxxxxxxxx

Step 7: Check for extension updates

After the update, check whether extension updates are offered to you. If so, install them to complete the update.

Update through shell

This tutorial is made for professionals who are familiar with the shell! The shell executes commands without further inquiry, you should follow this tutorial only if you know what you're doing! Shopware doesn't give any warranty to this, so please make a backup of your server before start working in any case!

Step 1: Upload and unzip

Please find the correct Shopware version in the change log and and copy the download link for it. Make sure that the link points to the archive with the update.
Now navigate with the shell to the main directory of the shop. There you enter this command to download the update package:


wget URL_FOR_DOWNLOAD

Often the download link can be added in the shell by right-clicking with the mouse. If your shell does not support pasting from the clipboard, enter the download link manually.
After the download is completed, unpack the archive with:


unzip NAME_OF_THE_ZIP_FILE

Usually it is sufficient to enter a unique part of the name after unzip here. The tab key is used to add the complete name.

Important! Both commands must be executed within the Shopware main directory.

Step 2: Update

Possibility 1: Update using the wizard

To start the update wizard use the following command:


php public/recovery/update/index.php

The updater will start:

Press ENTER to start the update. After the database updates, old files  will be deleted and the cache is cleared.

Versions prior to 6.4.2.0, may have isolated PHP error messages. However, these do not affect the update. Nevertheless, follow the step below to check if the update was successful.

After the update is done, the directory /update-assets has to be removed to set the shop live again:
You can delete the directory /update-assets with the following command:


rm -r update-assets/

Besides the /update-assets you can delete the archive after the update.
You remove this with the command:


rm NAME_OF_THE_ZIP_FILE

This completes the update.
Possibility 2: One line update

The update can also be executed without the wizard, you can use the following parameters for this purpose:

  • --quiet => execution in the background
  • --no-interaction => no interaction

The update command would look like this:


php public/recovery/update/index.php --no-interaction --quiet && rm -r update-assets/

Step 3: Delete browser cache

Before you open the Shopware admin, please delete your browser cache (cache & offline website data).

Step 4: Validate

Open the frontend and check the shop for functionality - if problems occur, clear the caches in the Shopware Admin under Settings > System > Cache & Indexes

and if needed the following directories:

  • /var/cache/prod_xxxxxxxxxxxx

xxxxxxxxxxxx is the revision of your Shopware version.

Step 5: Check for extension updates

After updating Shopware, please open the Shopware Admin under Extensions > My Extensions and take a look for Extension updates. If available, please update all extensions to complete your update.
 

Update per administration

Of course, you can also carry out an update directly via the administration. You will find the option under Settings > System > Shopware Update. In the window you will see your current version. You can disregard the "Update code" field for the time being. This is only necessary in individual cases when you receive it from support, for example, to install a specific bug fix. 

In contrast to the other two variants, an update via the administration can only ever be made to the latest version.

Step 1: Look for an update

(1) You can use the Check for updates button to search specifically and check whether you can update to the latest version.

Step 2: Check system requirements

(2) Before you start the update, the system requirements are checked again. If something is not in the green zone, you should definitely check your system for the required system requirements beforehand and adjust them if necessary.

Step 3: Deactivate extensions

 
The last step before installing the update requires you to check your extensions. Here you should deactivate all incompatible extensions. Then you can install the update.
 

Step 4: Install the update

If you have followed all the steps and installed the update, you will see the green ticks on the left side. Then you can complete the update successfully.

Update with Composer

Please note that this method is currently not possible when updating from Shopware 6.4.20.2 to 6.5.x.x.

This already applies from Shopware 6.3.0

Navigate in your shopware root directory. There, you can run the following command: 

bin/console system:update:prepare

Open composer.json and replace shopware/core... with your wanted Shopware version like 6.4.18.0 
Then you can start your update with the following command:

composer update

Run migrations with:

bin/console system:update:finish

Was this article helpful?