Since I encountered several issues during the Shopware 6 update process, and a Shopware developer recommended using composer update --no-scripts
instead of composer update
, I decided to write a guide on how to update Shopware 6 using this command.
Please note that this guide is applicable if Shopware was installed using the shopware-installer.phar.php and you have SSH access to the server. While it may also work for other installation methods, I have not tested those.
This guide allows you to specify the exact version of Shopware 6 you want to update to.
You can find all Shopware releases on GitHub.
Steps to Update Shopware 6 with Composer
-
Backup Your System:
- Ensure you have a backup of your database and files before proceeding.
-
Prepare for Update:
- Run the following command to prepare the system for the update:
bin/console system:update:prepare
- Run the following command to prepare the system for the update:
-
Update Composer Dependencies:
- Open
composer.json
and update the versions for the following packages:shopware/core
shopware/administration
shopware/elasticsearch
shopware/storefront
- If you have installed any plugins using Composer, update their versions as well.
- Open
-
Execute Composer Update:
- Run the following command to update dependencies:
composer update --no-scripts
- Composer will notify you of any conflicts. If conflicts occur, manually resolve them by editing the
composer.json
file and re-running the previous command. For example, when upgrading from Shopware 6.5 to 6.6, change the required packagesymfony/runtime
to>=5
. Or update PHP as required.
- Run the following command to update dependencies:
-
Remove Bin Directory:
- Remove the
bin
directory and index.php to ensurerecipes:install
can update files likebin/console
:rm -rf bin rm public/index.php
- Remove the
-
Install Composer Recipes:
- Execute the following command to install Composer recipes:
yes | composer recipes:install --force --reset
- Execute the following command to install Composer recipes:
-
Finish the Update:
- Run the following command to complete the update process:
bin/console system:update:finish
- Run the following command to complete the update process:
Update Plugins
-
Update All Plugins:
- Run the following command to update all plugins:
bin/console plugin:update:all
- Run the following command to update all plugins:
-
Clear Cache:
- Clear the cache by running:
bin/console cache:clear
- Clear the cache by running:
Health check errors may occur after the update. To resolve them, close the browser and run the clear cache command again.
If you encounter any issues, check the logs and resolve them accordingly.
I can also recommend joining the Shopware Slack Community and asking for help in the #shopware6
channel.