How to Install Shopware on Debian 10

Install Shopware on Debian 10

In this article, we will have explained the necessary steps to install and configure Shopware on Debian 10. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Shopware is a free and open-source e-commerce application. As an alternative to another e-commerce application, like Magento, Shopware is a complete e-commerce solution it is a very powerful and flexible application. However, it is not entirely free, but has a community version that we can use for our small business or just to test.

Install Shopware on Debian

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

sudo apt update
sudo apt upgrade

Step 2. Install LAMP on Debian Linux.

Shopware is a web application. Therefore it requires a LAMP server installed on the server. So, installing LAMP on Debian system is the first step in this tutorial. Read our post about it.

Step 3. Install Shopware on Debian.

First, download the latest release of Shopware:

cd /tmp/
wget -c https://www.shopware.com/en/Download/redirect/file/install_6.1.3_1582123990.zip

Next, create a folder for Shopware:

mkdir shopware
cd shopware/
unzip ../install_6.1.3_1582123990.zip

Then, return to the previous directory and move the Shopware folder to the Apache root directory:

cd ..
sudo mv shopware/ /var/www/html/

Change the owner and set the correct permissions for these files, you need to run the following command:

sudo chown -R www-data:www-data /var/www/html/shopware/
sudo chmod -R 775 /var/www/html/shopware

Step 4. Configure the Database.

Next, we need to create a new database. To do this, log in to your MariaDB database server as the root user by typing the following command:

sudo mysql -u root -p

Once you are signed in, create a new database and user:

CREATE DATABASE shopware;
CREATE USER [email protected] IDENTIFIED BY 'strong-your-password';
GRANT ALL PRIVILEGES ON shopware.* TO [email protected];
FLUSH PRIVILEGES;

Step 5. Configure Apache.

We have to make a new virtual host for Shopware. To create a new file for this and add the following:

sudo nano /etc/apache2/sites-available/shopware.conf
<VirtualHost *:80>
     DocumentRoot /var/www/html/shopware/public
     ServerName your-domain.com

    <Directory /var/www/html/shopware/public>
        Options FollowSymlinks
        AllowOverride All
        Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/shopware_error.log
     CustomLog ${APACHE_LOG_DIR}/shopware_access.log combined

</VirtualHost>

Reload your Apache server in order to activate the new configuration:

sudo a2ensite shopware.conf
sudo a2enmod rewrite
sudo systemctl reload apache2

Step 6. Accessing Shopware Installation.

Now open your favorite web browser and go to http://your-server/ or http://mydomain.com to start the Shopware installation wizard.

Congratulation, you have learned how to install and configure Shopware on Debian 10 Buster. If you have any question, please leave a comment below.