Shopware 6.7 marks a significant evolution in e-commerce performance, developer ergonomics, and admin usability. Released with native support for PHP 8.3, enhanced caching layers, and a redesigned storefront engine, it offers merchants faster load times and developers a more robust foundation. However, unlocking these benefits requires a precise installation environment.

This guide walks you through installing Shopware 6.7 on Ubuntu Server (22.04 or 24.04 LTS). We will focus not just on running commands, but on understanding the architectural requirements specific to version 6.7, ensuring your stack is secure, performant, and ready for production traffic.

Prerequisites

Before beginning, ensure you have:

  • An Ubuntu Server instance with root or sudo privileges.
  • A fully qualified domain name (FQDN) pointing to your server IP.
  • Open ports 80 and 443 accessible.
  • Basic familiarity with the Linux terminal.

Step 1: System Updates and Dependencies

Shopware relies on a suite of system libraries. We start by updating the package index and installing essential build tools.

sudo apt update && sudo apt upgrade -y
sudo apt install software-properties-common curl wget gnupg unzip git zip htop -y

Adding the Ondrej PHP Repository

Shopware 6.7 requires PHP 8.2 or 8.3. The default Ubuntu repositories often lag behind these versions. We will add the widely trusted ondrej/php PPA to access the latest releases.

sudo add-apt-repository ppa:ondrej/php -y
sudo apt update

Step 2: Installing PHP 8.3 and Extensions

Shopware 6.7 is resource-intensive and strictly typed. You must install the correct PHP version with specific extensions. Missing extensions can cause silent failures in media processing or taxation calculations.

sudo apt install php8.3-fpm php8.3-cli php8.3-common \
    php8.3-mysql php8.3-zip php8.3-gd php8.3-mbstring \
    php8.3-curl php8.3-xml php8.3-bcmath php8.3-intl \
    php8.3-imagick php8.3-soap php8.3-readline \
    php8.3-imap php8.3-sqlite3 php8.3-redis -y

Why these packages?

  • bcmath: Essential for precise financial calculations and taxation rules in Shopware 6.7.
  • imagick: Required for high-performance media conversion (thumbnails, PDF generation).
  • redis: Optional but highly recommended. Shopware 6.7 leverages Redis heavily for session storage and transactional caching.
  • imap: Needed if you plan to use the email marketing or support features.

Restart PHP-FPM to apply changes:

sudo systemctl restart php8.3-fpm

Optimizing php.ini for Shopware 6.7

Shopware's CLI commands and background tasks consume significant memory. Open your FPM php.ini file (usually /etc/php/8.3/fpm/php.ini) and apply these critical settings:

memory_limit = 1024M
max_execution_time = 300
max_input_vars = 6000
upload_max_filesize = 256M
post_max_size = 256M
opcache.enable=1
opcache.memory_consumption=256
opcache.max_accelerated_files=30000
opcache.revalidate_freq=0

Explanation: memory_limit prevents kernel crashes during large imports or updates. opcache is mandatory for Shopware 6.x performance; the increased max_accelerated_files accommodates the larger codebase of version 6.7. Restart PHP-FPM after saving.

Step 3: Database Configuration

Shopware 6.7 recommends MariaDB 10.6+ or MySQL 8.0+. We'll install MariaDB and secure it.

sudo apt install mariadb-server mariadb-client -y
sudo mysql_secure_installation

During secure_installation, remove anonymous users, disable root remote login, and set a strong root password. Next, create the database and user specific to Shopware.

sudo mysql -u root -p

Run these SQL commands inside the MariaDB shell:

CREATE DATABASE shopware6 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'shopware_user'@'localhost' IDENTIFIED BY 'YourStrongDatabasePassword';
GRANT ALL PRIVILEGES ON shopware6.* TO 'shopware_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Note: Shopware 6.7 enforces strict charset requirements. utf8mb4 is non-negotiable for proper emoji support and data integrity in product descriptions and customer data.

Step 4: Installing Composer and Shopware 6.7

Install the latest Composer globally to manage dependencies.

curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

Now, download Shopware 6.7. In version 6.7, the project structure remains stable, but you must lock the version constraint to ensure compatibility with current releases and patches.

cd /var/www
sudo mkdir -p shopware6.7
sudo chown $USER:$USER shopware6.7
cd shopware6.7

composer create-project shopware/production . 6.7.*

Explanation: The shopware/production repository contains the full production-ready codebase, including storefront and admin bundles. Using 6.7.* ensures Composer installs the latest patch version within the 6.7 branch, which is crucial for security fixes without breaking changes.

Step 5: Running the Installation and Setting Permissions

Shopware provides a CLI installer that handles database migrations, license generation, and initial seeding. Run the install command:

bin/console system:install \
    --basic-setup \
    --create-license-key \
    --skip-buy-licenses \
    --server-url=https://your-domain.com

Key Flags Explained:

  • --basic-setup: Creates the admin user, storefront configuration, and default tax rules. It will prompt you for database credentials; enter those from Step 3.
  • --create-license-key: Generates a development license key automatically. For production, you should replace this with a valid commercial license via the Shopware account portal later.
  • --server-url: Sets the base URL for the application, preventing redirect loops in the admin panel.

After installation, fix permissions and clear caches:

bin/console system:setup
sudo chown -R www-data:www-data .
chmod +x bin/*
bin/console core:cache:clear

The system:setup command configures necessary folders for logs and uploads. The ownership must be set to the web server user (www-data) to prevent permission errors during asset compilation.

Step 6: Web Server Configuration (Nginx Example)

While Apache is supported, Nginx is recommended for Shopware 6.7 due to its efficiency with static assets and concurrency. Here is a minimal configuration block for /etc/nginx/sites-available/shopware.conf:

server {
    listen 80;
    server_name your-domain.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    server_name your-domain.com;
    root /var/www/shopware6.7/public;
    index index.php;

    ssl_certificate /etc/letsencrypt/live/your-domain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/your-domain.com/privkey.pem;

    client_max_body_size 256M;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ ^/(storefront|swaginstall|recovery)/ {
        auth_basic "Restricted";
        auth_basic_user_file /etc/nginx/.htpasswd;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php8.3-fpm.sock;
        fastcgi_param PHP_VALUE "memory_limit=1024M max_execution_time=300";
    }

    location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ {
        expires 30d;
        add_header Cache-Control "public, immutable";
    }
}

Important Notes:

  • The location ~ ^/(storefront|swaginstall|recovery)/ block protects sensitive directories with basic auth. You should generate the .htpasswd file and enable this in production.
  • fastcgi_param PHP_VALUE overrides the php.ini settings specifically for web requests, ensuring PHP-FPM respects memory limits during admin operations.

Enable the site and test config:

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

Step 7: SSL and Cron Jobs

Secure your connection with Let's Encrypt using Certbot:

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d your-domain.com

Shopware 6.7 relies on background tasks for price calculations, sitemap generation, and synchronization. Configure the cron job as the www-data user:

crontab -u www-data -e

Add the following line to run all system tasks every minute:

* * * * * /usr/bin/php8.3 /var/www/shopware6.7/bin/console core:task run all > /dev/null 2>&1

Explanation: The core:task run all command is the heartbeat of Shopware's asynchronous processing. Running this ensures your store remains consistent without manual intervention.

Conclusion and Next Steps

You have successfully installed Shopware 6.7 on Ubuntu. The installation leverages PHP 8.3 performance gains, robust database schemas, and optimized asset handling.

Before going live:

  1. Replace the license key with a valid one from your Shopware account.
  2. Review php.ini memory limits based on your expected traffic.
  3. Enable Redis for caching if you have it installed, by updating the .env file and running bin/console system:config:set core.redis.host "127.0.0.1".
  4. Run a security audit: Check directory permissions and ensure SSH keys are rotated.

Shopware 6.7 provides an exceptional foundation for scalable e-commerce. With this guide, your server is configured to handle the framework's demands while maintaining security and performance standards. Happy selling!