Shopware 6 is a powerful, open-source e-commerce platform. This guide walks you through installing Shopware 6 on a standard Tilaa VPS running a LAMP stack (Linux, Apache, MySQL, PHP).
- A Tilaa VPS with the LAMP appliance installed.
- Root access via SSH.
- A domain name pointing to your VPS IP address.
Step 1: System Updates & PHP 8.1
Shopware 6 requires PHP 8.1. Since Debian/Ubuntu repositories might have older versions, we will add a trusted repository.
1. Update your system and install dependencies:
apt update && apt upgrade -y
apt install -y lsb-release apt-transport-https ca-certificates software-properties-common
2. Add the PHP repository (Ondřej Surý):
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list
apt update
3. Install PHP 8.1 and required extensions:
apt install -y php8.1 php8.1-cli php8.1-fpm php8.1-mysql php8.1-xml php8.1-mbstring php8.1-curl php8.1-zip php8.1-gd php8.1-intl php8.1-common
Step 2: Configure PHP Settings
Shopware needs specific PHP limits to run smoothly. Edit the configuration file:
nano /etc/php/8.1/apache2/php.ini
Find and modify the following values:
memory_limit = 512M
upload_max_filesize = 10M
post_max_size = 10M
max_execution_time = 120
Save the file (Ctrl+O, Enter, Ctrl+X) and restart Apache:
systemctl restart apache2
Step 3: Create Database
We need a MySQL database and user for Shopware.
1. Log in to MySQL:
mysql -u root
2. Run the following SQL commands (replace strong_password with a real password):
CREATE DATABASE shopware;
CREATE USER 'shopware_user'@'localhost' IDENTIFIED BY 'strong_password';
GRANT ALL PRIVILEGES ON shopware.* TO 'shopware_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 4: Configure Apache Virtual Host
Tell Apache where to find your Shopware files.
1. Create a new config file:
nano /etc/apache2/sites-available/shopware.conf
2. Paste the following configuration (replace yourdomain.com):
<VirtualHost *:80>
ServerName yourdomain.com
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/shopware/public
<Directory /var/www/shopware/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/shopware_error.log
CustomLog ${APACHE_LOG_DIR}/shopware_access.log combined
</VirtualHost>
3. Enable the site and rewrite module:
a2ensite shopware.conf
a2enmod rewrite
systemctl restart apache2
Step 5: Download & Install Shopware
1. Create the directory and download the installer:
mkdir -p /var/www/shopware
cd /var/www/shopware
wget https://github.com/shopware/web-recovery/releases/latest/download/shopware-installer.phar.php
mv shopware-installer.phar.php shopware-installer.phar.php
2. Set correct permissions:
chown -R www-data:www-data /var/www/shopware
chmod -R 755 /var/www/shopware
Step 6: Run the Installation Wizard
Open your browser and navigate to: http://yourdomain.com/shopware-installer.phar.php
- Follow the on-screen wizard.
-
Database Setup: Enter the details you created in Step 3:
- Server: localhost
- User: shopware_user
- Password: strong_password
- Database: shopware
- Finish the installation.
Your Shopware 6 store is now live. Make sure to secure your site with an SSL certificate (Let's Encrypt) before going into production.