Installation / update via shell

Table of contents

Shopware can not only be installed via browser, it can also be installed and updated by shell to install and update your instances automatically or scripted. In the following article we describe how that works.

 

Installation

Upload and unzip installation package

At first, the install package must be uploaded via FTP, unzip it afterwards. The Database has to be created as well, so make sure, that you also have a usable database. If not, just create one.

 

Installation via wizard

The installation begins with the following command (assuming, that all commands are executed from the Shopware root directory!):

 


// Start installation
php recovery/install/index.php
 
// Getting help
php recovery/install/index.php --help

 

Press ENTER to start the installation:

At first, lets setup the database, the follwing data is needed:

Press Enter to use the recommendations (in Clamps), otherwise provide your desired values. If needed you can create a new database here, if you have the permissions to.

After providing all values, the database install starts:

After the database is set up, the basic informations like localization, host, path, name, email & currency are needed:

After this it goes on with the backend admin data:

After the admin user is created, you'll be asked for the license. You can choose between "ce" for installing a CE or "cm" for a commercial license, in this case you have to provide your license to continue:

After you provided the license, the installation has finished.

 

One line installation

To accelerate the installation or for scripting, a wizard is surely not useful, therefore we show you how you can install Shopware with one command:

 


php recovery/install/index.php --no-interaction --quiet --no-skip-import --db-host="HOST" --db-user="DATENBANKUSER" --db-password="DATENBANK-PASSWORT" --db-name="DB-NAME" --shop-locale="de_DE" --shop-host="HOST" --shop-path="/PFAD" --shop-name="SHOPNAME" --shop-email="EMAIL" --shop-currency="EUR" --admin-username="ADMIN-USERNAME" --admin-password="ADMIN-PASSWORT" --admin-email="ADMIN-EMAIL" --admin-name="ADMIN-NAME" --admin-locale="de_DE"

 

"--no-interaction" means no interaction, the installer won't ask you anything, it only uses the provided data. "--quiet" installs Shopware in the background. "--no-skip-import" imports the database no matter if the database is still stuffed.

 

For localisation you can choose between the following:

  • de_DE => Germany
  • en_GB => United Kingdom

 

At currencies, the following are available:

  • EUR => Euro
  • USD => US Dollar
  • GBP => British Pound

 

Update

Upload and unzip package

Just upload the update package and unzip it, don't forget to overwrite all files.

 

Update via wizard

The wizard update can be started with the following command:

 


php recovery/update/index.php

 

The updater starts:

With ENTER you start the update:

After the update has finished, the updater tells you to delete the /update-assets folder to remove the maintenance mode:

You can delete the /update-assets folder with the following command:

 


// update-assets löschen
rm -r update-assets/

 

One line update

Also the update can be processed by one command to script it. Therefore the following attributes can be used:

  • --quiet => Processing in the background
  • --no-interaction => No interaction

The command to update in one step is:

 


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