{"id":5014,"date":"2019-10-11T03:54:48","date_gmt":"2019-10-11T03:54:48","guid":{"rendered":"http:\/\/myprojects.advchaweb.com\/?p=5014"},"modified":"2020-10-21T06:30:13","modified_gmt":"2020-10-21T06:30:13","slug":"install-shopware-5","status":"publish","type":"post","link":"https:\/\/myprojects.advchaweb.com\/index.php\/2019\/10\/11\/install-shopware-5\/","title":{"rendered":"Install Shopware 5"},"content":{"rendered":"<p>Ref: https:\/\/github.com\/shopware\/shopware (Shopware 5)<br \/>\nhttps:\/\/github.com\/shopware\/platform (Shopware 6)<\/p>\n<p>Install Shopware 5:<br \/>\nClone the git to &#8216;shopware5&#8217; dir:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works$ git clone https:\/\/github.com\/shopware\/shopware.git shopware5\r\n<\/pre>\n<p>Go to the dir<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works$ cd shopware5\/<\/pre>\n<p>Change the files permission<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works\/shopware5$ sudo chmod -R 755 custom\/plugins engine\/Shopware\/Plugins\/Community files media var web<\/pre>\n<p>Go to &#8216;build&#8217;dir and use &#8216;ant&#8217; to build the configuration and database.<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works\/shopware5$ cd build\/<\/pre>\n<p>If not exist, install it first:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works\/shopware5\/build$ sudo apt install ant<\/pre>\n<p>configure:<\/p>\n<pre class=\"lang:default decode:true\">teddy@teddy:~\/Documents\/works\/shopware5\/build$ ant configure\r\nBuildfile: \/home\/teddy\/Documents\/works\/shopware5\/build\/build.xml\r\n\r\nconfigure:\r\n    [input] Please enter db-host: [localhost]\r\n\r\n    [input] Please enter db-port: [3306]\r\n\r\n    [input] Please enter db-name: []\r\nshopware5\r\n    [input] Please enter db-username: []\r\nroot\r\n    [input] Please enter db-password:\r\nteddy\r\n    [input] Please enter app.host (Hostname e.g. example.com): []\r\nshopware5.test\r\n    [input] Please enter app.path (e.g. \/shopware. Leave blank if installed in document root): []\r\n\r\n\r\nwrite-properties:\r\n[propertyfile] Creating new property file: \/home\/teddy\/Documents\/works\/shopware5\/build\/build.properties\r\n\r\nBUILD SUCCESSFUL\r\nTotal time: 41 seconds<\/pre>\n<p>Build:<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works\/shopware5\/build$ ant build-unit\r\nBuildfile: \/home\/teddy\/Documents\/works\/shopware5\/build\/build.xml\r\n\r\ncheck-composer-binary:\r\n\r\ninstall-composer-binary:\r\n     [exec] All settings correct for using Composer\r\n     [exec] Downloading...\r\n     [exec] \r\n     [exec] Composer (version 1.9.0) successfully installed to: \/home\/teddy\/Documents\/works\/shopware5\/composer.phar\r\n     [exec] Use it: php composer.phar\r\n     [exec] \r\n\r\nupdate-composer-binary:\r\n     [exec] You are running composer as \"teddy\", while \"\/home\/teddy\/.composer\" is owned by \"root\"\r\n     [exec] You are already using composer version 1.9.0 (stable channel).\r\n\r\nbuild-composer-install:\r\n     [exec] Loading composer repositories with package information\r\n     [exec] Installing dependencies (including require-dev) from lock file\r\n     [exec] Package operations: 145 installs, 0 updates, 0 removals\r\n     [exec]   - Installing ocramius\/package-versions (1.4.0): Loading from cache\r\n     ...\r\n     [exec] Package phpunit\/dbunit is abandoned, you should avoid using it. No replacement was suggested.\r\n     [exec] Generating optimized autoload files\r\n     [exec] Warning: Ambiguous class resolution, \"Doctrine\\ORM\\Persisters\\Entity\\BasicEntityPersister\" was found in both \"$baseDir . '\/engine\/Library\/Doctrine\/ORM\/Persisters\/Entity\/BasicEntityPersister.php\" and \"\/home\/teddy\/Documents\/works\/shopware5\/vendor\/doctrine\/orm\/lib\/Doctrine\/ORM\/Persisters\/Entity\/BasicEntityPersister.php\", the first will be used.\r\n     [exec] Warning: Ambiguous class resolution, \"Doctrine\\Common\\Proxy\\AbstractProxyFactory\" was found in both \"$baseDir . '\/engine\/Library\/Doctrine\/Common\/Proxy\/AbstractProxyFactory.php\" and \"\/home\/teddy\/Documents\/works\/shopware5\/vendor\/doctrine\/common\/lib\/Doctrine\/Common\/Proxy\/AbstractProxyFactory.php\", the first will be used.\r\n     [exec] ocramius\/package-versions:  Generating version class...\r\n     [exec] ocramius\/package-versions: ...done generating version class\r\n     [exec] &gt; .\/build\/composer-post-install-cmd.sh\r\n     [exec] + rm -rf -- \/home\/teddy\/Documents\/works\/shopware5\/build\/..\/vendor\/mpdf\/mpdf\/ttfonts\r\n     ...\r\nbuild-cache-dir:\r\n     [exec]  WARNING! Could not connect to database. Message from SQL Server: SQLSTATE[HY000] [1045] Access denied for user '******'@'localhost' (using password: NO) in \/home\/teddy\/Documents\/works\/shopware5\/engine\/Shopware\/Components\/DependencyInjection\/Bridge\/Db.php \r\n     [exec] \r\n     [exec]  \/\/ Clearing the cache for the production environment                           \r\n     [exec] \r\n     [exec]  [OK] Cache for the \"production\" environment was successfully cleared.          \r\n     [exec] \r\n\r\nbuild-config:\r\n     [copy] Copying 1 file to \/home\/teddy\/Documents\/works\/shopware5\r\n\r\nbuild-database-foundation:\r\n     [exec]  WARNING! Could not connect to database. Message from SQL Server: SQLSTATE[HY000] [1049] Unknown database 'shopware5' in \/home\/teddy\/Documents\/works\/shopware5\/engine\/Shopware\/Components\/DependencyInjection\/Bridge\/Db.php \r\n     [exec] \r\n     [exec]  \/\/ Drop database                                                               \r\n     [exec] \r\n     [exec]  \/\/ Create database                                                             \r\n     [exec] \r\n     [exec]  \/\/ Import database                                                             \r\n     [exec] \r\n     [exec] Current MigrationNumber: 0\r\n     [exec] Found 618 migrations to apply\r\n     [exec] Apply MigrationNumber: 101 - add-extended-editor-field\r\n     ...\r\n     [exec] Importing snippets for PluginManager plugin\r\n     [exec] Plugin snippets processed correctly\r\n\r\nbuild-theme-initialize:\r\n     [exec] Themes initialized\r\n\r\nbuild-create-admin-account:\r\n     [exec] \r\n     [exec]  [OK] Adminuser \"demo\" was successfully created.                                \r\n     [exec] \r\n\r\nbuild-install-lock-file:\r\n\r\nbuild-disable-firstrunwizard:\r\n     [exec] First Run Wizard disabled\r\n\r\ninstall-git-hooks:\r\n\r\nbuild-unit:\r\n\r\nBUILD SUCCESSFUL\r\nTotal time: 4 minutes 17 seconds<\/pre>\n<p>Download the test images and extract them. Go to the root directory of your shopware system and download the test images:<\/p>\n<pre class=\"lang:default decode:true\">teddy@teddy:~\/Documents\/works\/shopware5\/build$ cd ..\r\n\r\nteddy@teddy:~\/Documents\/works\/shopware5$ wget -O test_images.zip http:\/\/releases.s3.shopware.com\/test_images_since_5.1.zip<\/pre>\n<p>BEWARE: the file size about 285MB !!!<br \/>\nThen unzip the file<\/p>\n<pre class=\"lang:default decode:true \">teddy@teddy:~\/Documents\/works\/shopware5$ unzip test_images.zip<\/pre>\n<p>RUN PHP CLI &#8212; OR USE NGINX ??? BECAUSE IT&#8217;D REDIRECT TO http:\/\/shopware5.test\/<\/p>\n<pre class=\"lang:default decode:true\">teddy@teddy:~\/Documents\/works\/shopware5$ php -S localhost:8090\r\nPHP 7.1.32-1+ubuntu16.04.1+deb.sury.org+1 Development Server started at Fri Oct 11 11:25:44 2019\r\nListening on http:\/\/localhost:8090\r\nDocument root is \/home\/teddy\/Documents\/works\/shopware5<\/pre>\n<p>THEN OPEN IT ON YOUR BROWSER: http:\/\/localhost:8090\/shopware.php<br \/>\nNOTE: MUST USE PHP7.2. IF LOWER THAN THAT, IT&#8217;D DISPLAY THIS ERROR:<\/p>\n<pre class=\"lang:default decode:true \">Error\r\nYour server is running PHP version 7.1.32-1+ubuntu16.04.1+deb.sury.org+1 but Shopware 5 requires at least PHP 7.2.0\r\nFehler\r\nAuf Ihrem Server l\u00e4uft PHP version 7.1.32-1+ubuntu16.04.1+deb.sury.org+1, Shopware 5 ben\u00f6tigt mindestens PHP 7.2.0<\/pre>\n<p>If so, change the php version to 7.2 (min)<\/p>\n<pre class=\"lang:default decode:true\">teddy@teddy:~\/Documents\/works\/shopware5$ sudo ln -sfn \/usr\/bin\/php7.2 \/etc\/alternatives\/php<\/pre>\n<p>Then run the php cli again<\/p>\n<p>NGINX SETUP:<\/p>\n<pre class=\"lang:default decode:true\">sudo gedit \/etc\/nginx\/sites-available\/shopware5.test<\/pre>\n<p>CONTENT: (DONT USE THIS)<\/p>\n<pre class=\"lang:default decode:true\">server {\r\n    listen 80; \r\n    listen [::]:80;\r\n    root \/home\/teddy\/Documents\/works\/shopware5; #your document root\r\n    server_name www.shopware5.test shopware5.test ;  # Your server name\r\n    index index.php index.html index.htm ;\r\n\r\n    # Webfonts,fonts\r\n    location ~* \\.(?:ttf|ttc|otf|eot|woff|woff2)$ {\r\n        add_header \"Access-Control-Allow-Origin\" \"*\";\r\n        expires 1y;\r\n        access_log off;\r\n        add_header Cache-Control \"public\";\r\n    }\r\n\r\n    # Media: images, icons, video, audio, HTC\r\n    location ~* \\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {\r\n        expires 1y;\r\n        access_log off;\r\n        add_header Cache-Control \"public\";\r\n    }\r\n\r\n    # Js, Css\r\n    location ~* \\.(?:css|js)$ {\r\n        expires 1y;\r\n        access_log off;\r\n        add_header Cache-Control \"public\";\r\n    }\r\n\r\n    # Serve static files without touching php\r\n    location \/ {\r\n        try_files $uri $uri\/ \/index.php?$args;\r\n    } \r\n    # pass requests for dynamic content to site\r\n    location ~ [^\/]\\.php(\/|$) {\r\n        try_files $uri \/index.php; \r\n        fastcgi_pass unix:\/run\/php\/php7.3-fpm.sock;\r\n        \r\n        fastcgi_buffers 1024 4k;\r\n\r\n        fastcgi_read_timeout 600s;\r\n        fastcgi_connect_timeout 600s;\r\n\r\n        fastcgi_index index.php;\r\n        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n        #include fastcgi_params;\r\n        #FOR DEVELOPMENT MODE ONLY - BEGIN\r\n        fastcgi_param MAGE_IS_DEVELOPER_MODE true;\r\n        fastcgi_param PHP_VALUE  display_startup_errors=on;\r\n        fastcgi_param PHP_VALUE  display_errors=on;\r\n        fastcgi_param PHP_VALUE  html_errors=on;\r\n        fastcgi_param PHP_VALUE  log_errors=on;\r\n        fastcgi_param PHP_VALUE  error_log=\/home\/teddy\/Documents\/works\/shopware5\/var\/log\/system.log;\r\n        #FOR DEVELOPMENT MODE ONLY - END\r\n        include fastcgi_params;\r\n    }\r\n\r\n    gzip on;\r\n    gzip_disable \"msie6\";\r\n\r\n    gzip_comp_level 6;\r\n    gzip_min_length 1100;\r\n    gzip_buffers 16 8k;\r\n    gzip_proxied any;\r\n    gzip_types\r\n    text\/plain\r\n    text\/css\r\n    text\/js\r\n    text\/xml\r\n    text\/javascript\r\n    application\/javascript\r\n    application\/x-javascript\r\n    application\/json\r\n    application\/xml\r\n    application\/xml+rss\r\n    image\/svg+xml;\r\n    gzip_vary on;\r\n\r\n    # Banned locations (only reached if the earlier PHP entry point regexes don't match)\r\n    location ~* (\\.php$|\\.htaccess$|\\.git) {\r\n        deny all;\r\n    }\r\n}<\/pre>\n<p>USE THIS: (READ: https:\/\/websiteforstudents.com\/setup-shopware-on-ubuntu-16-04-18-04-lts-with-nginx-mariadb-and-php-7-1-fpm\/)<\/p>\n<pre class=\"lang:default decode:true\">server {\r\n    listen 80;\r\n    listen [::]:80;\r\n    root \/home\/teddy\/Documents\/works\/shopware5;\r\n    index  shopware.php index.php index.html index.htm;\r\n    server_name  shopware5.test www.shopware5.test;\r\n\r\n    client_max_body_size 100M;\r\n\r\n    location \/ {\r\n        try_files $uri $uri\/ \/shopware.php$is_args$args;\r\n    }\r\n\r\n    location \/recovery\/install {\r\n        index index.php;\r\n        try_files $uri \/recovery\/install\/index.php$is_args$args;\r\n    }\r\n\r\n    location \/recovery\/update\/ {\r\n        location \/recovery\/update\/assets {\r\n        }\r\n        if (!-e $request_filename){\r\n            rewrite . \/recovery\/update\/index.php last;\r\n        }\r\n    }        \r\n\r\n    location ~ \\.php$ {\r\n        include snippets\/fastcgi-php.conf;\r\n        fastcgi_pass    unix:\/run\/php\/php7.2-fpm.sock;\r\n        fastcgi_param   SCRIPT_FILENAME $document_root$fastcgi_script_name;\r\n    }\r\n\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>Enable file config<\/p>\n<pre class=\"lang:default decode:true\">sudo ln -s \/etc\/nginx\/sites-available\/shopware5.test \/etc\/nginx\/sites-enabled\/shopware5.test<\/pre>\n<p>&nbsp;<\/p>\n<p>Register the host on my system<\/p>\n<pre class=\"lang:default decode:true \">sudo gedit \/etc\/hosts<\/pre>\n<p>Like this:<\/p>\n<pre class=\"lang:default decode:true\">...\r\n127.0.0.1 shopware5.test\r\n...<\/pre>\n<p>CHECK THE NGINX SETTING AND RESTART IT:<\/p>\n<pre class=\"lang:default decode:true \">sudo nginx -t\r\n\r\nsudo service nginx restart<\/pre>\n<p>CHANGE FILE PERMISSIONS<\/p>\n<pre class=\"lang:default decode:true\">sudo chmod -R 777 var web\/cache\/<\/pre>\n<p>OPEN IT ON YOUR BROWSER: http:\/\/shopware5.test\/<br \/>\nIT SHOULD WORK! IF NOT CHECK \/var\/log\/nginx\/error.log<br \/>\nAND THE ADMIN PAGE ON http:\/\/shopware5.test\/backend\/<br \/>\nusername: demo<br \/>\npassword: demo<\/p>\n<p>Frontend users in demo data<br \/>\nCustomer:\u00a0test@example.com\u00a0\/ shopware<br \/>\nB2B:\u00a0mustermann@b2b.de\u00a0\/ mustermann<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ref: https:\/\/github.com\/shopware\/shopware (Shopware 5) https:\/\/github.com\/shopware\/platform (Shopware 6) Install Shopware 5: Clone the git to &#8216;shopware5&#8217; dir: teddy@teddy:~\/Documents\/works$ git clone https:\/\/github.com\/shopware\/shopware.git shopware5 Go to the dir teddy@teddy:~\/Documents\/works$ cd shopware5\/ Change the files permission teddy@teddy:~\/Documents\/works\/shopware5$ sudo chmod -R 755 custom\/plugins engine\/Shopware\/Plugins\/Community files media var web Go to &#8216;build&#8217;dir and use &#8216;ant&#8217; to build the configuration and database. &hellip; <a href=\"https:\/\/myprojects.advchaweb.com\/index.php\/2019\/10\/11\/install-shopware-5\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Install Shopware 5&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[110],"tags":[],"class_list":["post-5014","post","type-post","status-publish","format-standard","hentry","category-shopware"],"_links":{"self":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/5014","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/comments?post=5014"}],"version-history":[{"count":10,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/5014\/revisions"}],"predecessor-version":[{"id":7254,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/posts\/5014\/revisions\/7254"}],"wp:attachment":[{"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/media?parent=5014"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/categories?post=5014"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/myprojects.advchaweb.com\/index.php\/wp-json\/wp\/v2\/tags?post=5014"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}