The recommended way to install a Shopware 6 dev environment is by using Docker. For Linux users there are no other steps involved, just follow the quickstart guide on github.
However, since we have a diverse community, many of you use Windows or MacOS as the operating system. Since Docker is built around the Linux Kernel, running it on other operating systems still requires some understanding, and there are usually some drawbacks. Even under MacOS, Docker can now be used without any loss of performance, but additional steps are necessary.
You can find instructions for setting up Docker and docker-sync in the documentation.
So if you are using Windows or a Mac and want to have a quick and bulletproof way to get a shopware dev environment running, this blog post is for you!
Unlike Docker or local setup, Vagrant is a complete separate server on your machine. Due to technical reasons, the Vagrant machine acts like a remote web server. With this setup, you'll develop your code on your computer. Afterwards you have to upload/synchronize it to the Vagrant machine. For this, the Vagrant machine supports SCP/SSH, which is integrated in Editors like PHPStorm or Visual Studio Code.
This blog post describes how to use Vagrant on Windows, but you can also use it on Linux or MacOS if you do not want to use Docker.
Start by cloning the repository shopwareLabs/shopware-platform-Vagrant
> git clone email@example.com:shopwareLabs/shopware-platform-vagrant.git
> cd shopware-platform-vagrant
Next, execute Vagrant up and wait while Vagrant downloads a virtual box image, clones the platform and configures the server.
> vagrant up
Note: This will take quite a while on first execution. But caches will be created and used on any further up call.
Afterwards you have a fully fledged Shopware Platform up and running. Access it through your browser:
In the terminal access the virtual machine via:
> vagrant ssh
> cd shopware-dev/
Note: You should update the box regularly by running
vagrant provision - this will reset the box to its stock statemeaning. Content inside the box will be wiped and deleted.
Connecting your IDE
The Vagrant box fully encapsulates the whole platform with all its sources. So the development process works just like with any other foreign system. The machine supports SCP with the following credentials.
Have fun with your Shopware 6 and tell us and our community about your experiences!
Whether you're writing plugins, proposing code changes via pull requests, or exchanging ideas in Gitter or the Shopware Forum - you are a vital part of the source of inspiration we are proud to call the Shopware Community.
Join the community now !
Follow us on Twitter: @ShopwareDevs