Shopware Installation
This chapter guides you through the installation of Shopware 6 with the specific requirements for the ShopBite Plugin.
System Requirements
Server Requirements
- Web Server: Apache 2.4+ or Nginx 1.20+
- PHP: 8.4 or higher
- Database: MySQL 5.7+ or MariaDB 10.3+
- Memory: At least 2GB RAM, 4GB recommended
- Disk Space: At least 10GB free storage
PHP Extensions
# Required PHP extensions
php -m | grep -E "(ctype|curl|gd|intl|json|mbstring|openssl|pdo_mysql|tokenizer|xml|zip)"
# Install missing extensions (Ubuntu/Debian)
sudo apt-get install php8.4-{ctype,curl,gd,intl,json,mbstring,openssl,pdo_mysql,tokenizer,xml,zip}
Recommended Shopware Version
The ShopBite Plugin supports Shopware 6.7.0 and higher. We recommend using the current stable version.
Installation Methods
1. Official Shopware Installation
Follow the official Shopware documentation:
- Installation Wizard: docs.shopware.com/installation
- CLI Installation:
# Download Shopware wget https://www.shopware.com/download -O shopware.zip unzip shopware.zip cd shopware # Start installation php bin/console system:install
2. ShopBite Pre-configured Repository
For quick setup with ShopBite-specific configurations:
# Clone repository
git clone https://github.com/shopbite-de/shopware.git
cd shopware
# Install dependencies
composer install
# Set up database
bin/console system:install \
--db-host=localhost \
--db-user=shopware \
--db-password=securepassword \
--db-name=shopware \
--shop-name="My ShopBite Shop" \
--shop-locale=de-DE \
--currency=EUR \
--admin-username=admin \
--admin-password=secureadminpassword \
--admin-email=admin@my-shop.de
Shopware Configuration for ShopBite
Basic Settings
- Language and Currency:
- Language: German (de-DE)
- Currency: Euro (EUR)
- Timezone: Europe/Berlin
- Set up Sales Channel:
- Navigate to Settings > Sales Channels
- Create a new Sales Channel for ShopBite
- Select Storefront Type: "Storefront"
- Configure API Access:
- Navigate to Settings > System > Integrations
- Create a new integration for ShopBite
- Set permissions:
order:read,order:write,product:read
Performance Optimization
# Cache configuration
bin/console cache:configure --env=prod
# Enable OPcache
php -i | grep opcache
# Optimize Shopware cache
bin/console cache:pool:clear
bin/console cache:warmup
Database Optimization
-- MySQL optimization
SET GLOBAL innodb_buffer_pool_size = 1024 * 1024 * 1024; -- 1GB
SET GLOBAL innodb_log_file_size = 256 * 1024 * 1024; -- 256MB
SET GLOBAL innodb_flush_log_at_trx_commit = 2;
-- Indexes for ShopBite tables
ALTER TABLE `shopbite_business_hour` ADD INDEX `idx_sales_channel` (`sales_channel_id`);
ALTER TABLE `shopbite_holiday` ADD INDEX `idx_sales_channel` (`sales_channel_id`);
Shopware Update
Update Preparation
# Enable maintenance mode
bin/console maintenance:enable
# Create backup
mysqldump -u shopware -p shopware > shopware_backup_$(date +%Y-%m-%d).sql
tar -czvf shopware_files_$(date +%Y-%m-%d).tar.gz public/ config/
Update Execution
# Shopware update
composer update shopware/core
bin/console system:update:prepare
bin/console system:update:finish
# Run database migrations
bin/console database:migrate
# Clear cache
bin/console cache:clear
Post-Update
# Disable maintenance mode
bin/console maintenance:disable
# Check plugin compatibility
bin/console plugin:check-compatibility
# Run ShopBite-specific migrations
bin/console database:migrate --all ShopBite
Common Installation Issues
Problem: PHP Version Not Compatible
Symptoms:
- Error: "PHP version 8.4 required"
- Shopware does not start
Solution:
# Check PHP version
php -v
# Install PHP 8.4 (Ubuntu/Debian)
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php8.4
# Switch PHP version
sudo update-alternatives --config php
Problem: Database Connection Failed
Symptoms:
- Error: "SQLSTATEHY000 2002 Connection refused"
- Shopware cannot establish database connection
Solution:
# Check database service
sudo systemctl status mysql
# Restart database
sudo systemctl restart mysql
# Check permissions
mysql -u root -p
GRANT ALL PRIVILEGES ON shopware.* TO 'shopware'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
Problem: Cache Issues
Symptoms:
- Changes are not displayed
- Error: "Cache directory not writable"
Solution:
# Set cache permissions
sudo chmod -R 777 var/cache
sudo chown -R www-data:www-data var/
# Clear cache
bin/console cache:clear --no-warmup
bin/console cache:warmup
Next Steps
- Plugin Installation - Install ShopBite Plugin
- Plugin Configuration - Set up plugin
- Shopware Documentation - Official Shopware Documentation