A complete GUIDE to installing the latest version of shopware on Linux

Mivocloud

Member
Hello!

I’ve created a tutorial that shows you how to install Shopware. However, I understand that sharing a link to it here might be considered self-promotion. I just want to point out that the installation can be quite difficult and time-consuming to figure out. So, I personally found a good method for installing Shopware, and I’ll share the commands here. However, if the administration permits, I’ll post the video as well. :)

Shopware is an open-source eCommerce platform used for building and managing online stores. Developed in Germany, it offers robust features for customization, scalability, and flexibility, making it popular among businesses of all sizes, especially in Europe.

Commands Used:
sudo apt update sudo apt upgrade -y
sudo apt install nginx mariadb-server -y
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:ondrej/php
sudo apt-get install php8.3 php8.3-cli php8.3-fpm php8.3-common php8.3-mysql php8.3-curl php8.3-zip php8.3-gd php8.3-xml php8.3-mbstring php8.3-intl php8.3-opcache git unzip socat curl bash-completion -y
sudo sed -i "s/memory_limit = .*/memory_limit = 768M/" /etc/php/8.3/fpm/php.ini
sudo sed -i "s/upload_max_filesize = .*/upload_max_filesize = 128M/" /etc/php/8.3/fpm/php.ini
sudo sed -i "s/post_max_size = .*/post_max_size = 128M/" /etc/php/8.3/fpm/php.inisudo sed -i "s/;opcache.memory_consumption=128/opcache.memory_consumption=256/" /etc/php/8.3/fpm/php.ini
sudo systemctl restart php8.3-fpm
sudo nano /etc/nginx/sites-available/shopware

server {
listen 80;
server_name YOUR DOMAIN OR IP; # Check this
root /var/www/html/shopware/public; # Check this

location / {
try_files $uri /index.php$is_args$args;
}

location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock; # Check this
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

location ~ /\.ht {
deny all;
}

error_log /var/log/nginx/shopware_error.log;
access_log /var/log/nginx/shopware_access.log;
}

sudo nginx -t
sudo ln -s /etc/nginx/sites-available/shopware /etc/nginx/sites-enabled/
sudo systemctl reload nginx

sudo mysql
CREATE DATABASE shopware;
CREATE USER 'shopware'@'localhost' IDENTIFIED BY 'mivo';
GRANT ALL PRIVILEGES ON shopware.* TO 'shopware'@'localhost';
FLUSH PRIVILEGES;
EXIT;

sudo apt-get remove --purge mariadb-server mariadb-client mariadb-common mariadb-server-core-* mariadb-client-core-*

sudo apt-get autoremove
sudo apt-get autoclean

sudo nano /etc/apt/sources.list.d/mariadb.list

deb [arch=amd64,arm64,ppc64el] http://ftp.osuosl.org/pub/mariadb/repo/10.11/ubuntu jammy main

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
sudo apt-get update
sudo apt-get install mariadb-server
mariadb --version

wget https://github.com/shopware/web-recovery/releases/latest/download/shopware-installer.phar.php
sudo mkdir /var/www/html/shopware
sudo chown -R www-data:www-data /var/www/html/shopware
sudo chmod -R 755 /var/www/html/shopware
cd /var/www/html/shopware
sudo apt install composer -y
sudo composer create-project shopware/production .
sudo mkdir -p /var/www/html/shopware/var/cache/prod
sudo chown -R www-data:www-data /var/www/html/shopware
sudo chmod -R 775 /var/www/html/shopware/var
 
Back
Top