How to Install Shopware Community Edition on Arch Linux

Shopware Community Edition is an open-source e-commerce platform that allows businesses to create and manage online stores. In this tutorial, we will cover the step-by-step process of installing Shopware Community Edition on Arch Linux.

Prerequisites

Before we begin, please ensure that you have the following:

Step 1: Install Required Dependencies

The first step is to install the required dependencies for Shopware Community Edition. You can do this by running the following command:

sudo pacman -Syu php php-gd php-intl php-pdo php-xml php-fpm composer apache mariadb

Step 2: Install Shopware Community Edition

Now that the dependencies are installed, the next step is to download and install Shopware Community Edition. You can do this by following these steps:

  1. Download the latest version of Shopware Community Edition from their website: https://www.shopware.com/community/

  2. Extract the downloaded file to /var/www/html/, or to any other directory of your choice.

    tar -zxvf file-name.tar.gz -C /var/www/html/
    
  3. Rename the extracted directory to shopware.

    mv shopware-6.x.x /var/www/html/shopware
    
  4. Navigate to the shopware directory.

    cd /var/www/html/shopware
    
  5. Install Shopware Community Edition using Composer.

    composer install --no-dev --no-scripts
    
  6. Set the file permissions for shopware.

    sudo chown -R http:http /var/www/html/shopware
    sudo chmod -R 755 /var/www/html/shopware
    

Step 3: Create a Database

Next, we need to create a database for Shopware to use. Follow these steps to create a database:

  1. Log in to your MySQL or MariaDB server.

    sudo mysql -u root -p
    
  2. Create a new database for Shopware.

    CREATE DATABASE shopware;
    
  3. Create a new user and grant the necessary privileges.

    CREATE USER 'shopware-user' IDENTIFIED BY 'password';
    GRANT ALL PRIVILEGES ON shopware.* TO 'shopware-user';
    FLUSH PRIVILEGES;
    
  4. Exit the MySQL or MariaDB server.

    exit;
    

Step 4: Configure Apache and PHP

Now that Shopware Community Edition and the database are set up, we need to configure Apache and PHP to run it. Follow these steps:

  1. Create a new Apache virtual host configuration file.

    sudo nano /etc/httpd/conf/extra/shopware.conf
    
  2. Paste the following content into the file.

    <VirtualHost *:80>
        ServerAdmin admin@example.com
        ServerName example.com
        DocumentRoot /var/www/html/shopware/public
        <Directory /var/www/html/shopware/public>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Require all granted
        </Directory>
        ErrorLog /var/log/httpd/shopware_error.log
        CustomLog /var/log/httpd/shopware_access.log combined
    </VirtualHost>
    

    Replace example.com with your domain name. Save and exit the file.

  3. Enable Apache rewrite module.

    sudo sed -i 's/^#LoadModule rewrite_module/LoadModule rewrite_module/' /etc/httpd/conf/httpd.conf
    
  4. Restart Apache.

    sudo systemctl restart httpd.service
    
  5. Set up PHP configuration.

    sudo nano /etc/php/php.ini
    
  6. Find the expose_php setting and set it to Off.

    expose_php = Off
    
  7. Find the memory_limit setting and set it to at least 512M.

    memory_limit = 512M
    
  8. Save and exit the file.

  9. Restart the PHP-FPM service.

    sudo systemctl restart php-fpm.service
    

Step 5: Install Shopware Community Edition

Finally, open your web browser and navigate to your domain name. You should see the Shopware Community Edition installation wizard. Follow the prompts to complete the installation, and remember to enter the database information you set up in Step 3 when prompted.

Congratulations! You have successfully installed Shopware Community Edition on Arch Linux.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!