This document contains shopware 6 preparation and plugin installation steps:
Content
- Run in bash
docker-compose up
INFO
In case of manual access will be needed to MySQL or SSH/SFTP in docker-compose.yml expose their ports
ports:
MYSQL_PORT:3306
SSH_PORT:22
Shopware admin credentials
- Login: admin
- Password: shopware
MySQL credentials
- User: shopware
- Password: shopware
- Port: 3306
SSH/SFTP credentials
- User: dockware
- Password: dockware
- Port: 22
Content:
- Mysql installation
- PHP installation
- Nginx installation
- Mysql, PHP, Nginx Configuration
- Shopware6 installation
- Plugin installation
- Plugin configuration
- Install Mysql via brew
brew install mysql
- To start mysql server in Daemon mode
brew services start mysql
- To stop server from Daemon mode
brew services stop mysql
- To add root password
mysql_secure_installation
Go by steps, add root password, you can keep anonymous users for later testing purposes
- Free mode start/stop (Life cycle until reboot)
mysql.server start
mysql.server stop
- Install Mysql via brew
brew install php
- To start php-fpm in Daemon mode
brew services start php
- To stop nginx from Daemon mode
brew services stop php
- Install Mysql via brew
brew install nginx
- To start nginx in Daemon mode
brew services start nginx
- To stop nginx from Daemon mode
brew services stop nginx
- Mysql
Login into mysql
mysql -u root -p
Create database for shopware6
CREATE DATABASE shopware6
- PHP
In file /opt/homebrew/etc/php/8.2/php-fpm.d/www.conf (in place of 8.2 put your version) File location may differ depending on your configurations
Change
user = _www
group = _www
listen = 127.0.0.1:9000
in file /opt/homebrew/etc/8.2/php.ini Change memory limit to 512m
memory_limit = 512M
to (I will use 82 (version) in port, so will be able to use differenc version without interfering)
user = <your_username>
group = staff
listen = 127.0.0.1:9082
Restart php-fpm
brew services restart php
- Nginx
In file /opt/homebrew/etc/nginx/nginx.conf File location may differ depending on your configurations
- Uncomment first line and change to
user <your_username> staff;
- In block server, change this (You can change value of listen to change nginx port)
listen 80;
server_name localhost;
index index.html;
to
server_name localhost test.x;
index index.php index.html index.htm;
- Change location from
location / {
root html;
index index.html index.htm index.php;
}
to
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
- Add php-fpm location below location / block
# Needed for Shopware install / update
location /recovery/install {
index index.php;
try_files $uri /recovery/install/index.php$is_args$args;
}
location /recovery/update/ {
if (!-e $request_filename){
rewrite . /recovery/update/index.php last;
}
}
location ~* ^.+\.(?:css|cur|js|jpe?g|gif|ico|png|svg|webp|html|woff|woff2|xml)$ {
expires 1y;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
access_log off;
# The directive enables or disables messages in error_log about files not found on disk.
log_not_found off;
tcp_nodelay off;
## Set the OS file cache.
open_file_cache max=3000 inactive=120s;
open_file_cache_valid 45s;
open_file_cache_min_uses 2;
open_file_cache_errors off;
}
location ~* ^.+\.svg$ {
add_header Content-Security-Policy "script-src 'none'";
}
location ~ \.php$ {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_index shopware.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
#include fastcgi.conf;
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;
client_max_body_size 24M;
client_body_buffer_size 128k;
fastcgi_pass 127.0.0.1:9082;
#fastcgi_pass unix:/run/php/php7.2-fpm.sock;
#http2_push_preload on;
}
- Restart nginx
brew services restart nginx
- Test nginx and php run
mv /opt/homebrew/var/www/index.html /opt/homebrew/var/www/index.php
Change /opt/homebrew/var/www/index.php file content to
<?php
phpinfo();
?>
Visit nginx localhost it should open php version and info page
- Download latest version of Shopware6
- Unzip files in nginx directory /opt/homebrew/var/www/
- In browser open nginx localhost
Installation steps:
- Choose language and push next
- Check system requirements and push next
- Agree to terms of service
- Add Database user that you have created
- Database server: localhost
- Database user: root
- Database password: <your_user_password>
- Database name: shopware6
- Hit start installation
- Shop set up
- Name of your shop: Demoshop
- E-mail address of the shop: your.email@shop.com
- Main language: English (You can choose Deutsch)
- Default currency: Euro
- Default country: Germany
- Admin e-mail: demo@demo.de
- Admin name: Demo-Name
- Admin surname: Demo-Surname
- Admin login name: demo
- Admin password: adminadmin
- Hit next
- Install demo data hit next
- Choose Demoshop as sales channel hit next
- Mailer configure: hit configure later
- Skip Paypal configuration
- Skip extensions
- Skip shopware account
- Activate store
- Finish
- Create plugin archive in repo
- If you want to change sandbox from demo to stage In file src/Components/PluginConfig/Service/ConfigService.php modify
const SANDBOX_API_URL = 'https://api.demo.mondu.ai/api/v1';
const SANDBOX_WIDGET_URL = 'https://checkout.demo.mondu.ai/widget.js';
to
const SANDBOX_API_URL = 'https://api.demo.mondu.ai/api/v1';
const SANDBOX_WIDGET_URL = 'https://checkout.demo.mondu.ai/widget.js';
- Create a release which needs uploaded to shopware
# If you don't want to change version, write same version under both fields
./releaser.sh -v <new_version> -o <ol_version>
- Go to Shopware6 backend
- Login: demo
- Password: adminadmin
- In left sidebar go to Extensions=>My extensions
- Hit Upload extension, choose generated release zip and complete.
- Go to Shopware 6 Admin
- Login: demo
- Password: adminadmin
- In left sidebar go to Extensions=>My extensions
- In left sidebar go to Sales Channels=>Storefront
- Scroll to Payment methods
- Add all Mondu methods
- Hit save