We published a Vagrant Setup that provides you with a basic Ubuntu 16.04 that contains everything that you needed to develop with Shopware.
It contains the Apache2 Web Server, MySQL Server as well as all required tools, like
Please note that Vagrant setup does not contain a Shopware installation. The installation has to be done manually.
Download the required software:
Additional Information for VirtualBox setup (Windows), or you get errors like "error downloading the file" without any further explanation:
The provisioning is done directly on your new virtual machine by Ansible.
$ git clone https://github.com/shopware5/shopware-vagrant $ cd shopware-vagrant
$ vagrant up
The first boot may take a while. After that, your machine will be available at http://192.168.33.10/. All required tools like the LAMP stack are already installed.
The SSH username is
vagrant, the password:
vagrant. To automatically SSH into the created VM run
vagrant ssh. If you use Putty, the SSH configuration can be obtained via:
$ vagrant ssh-config
The official Shopware plugin is available in the global jetbrains repository and can therefore be installed right inside your editor. It depends on the Symfony2 plugin which will automatically be installed during the installation of the Shopware plugin. You can read more about its features on the official plugin page.
PhpStorm provides you with a variant of automatic code completions. First, PhpStorm needs to index all files inside your Project. This might take a while, depending on the number and size of files in your project.
To exclude directories from indexing, open the Settings and select Directories in the left sidebar. You can now select directories on the right side and mark them as excluded by clicking on Excluded above.
The following directories (if existing) should be excluded: - files - media - recovery - snippets - var - web
These directories will be marked red in your project and might not be visible anymore, but they will still remain on your hard drive.
As mentioned in our CONTRIBUTING.md, you should follow the PSR-1 and PSR-2 coding standards. PhpStorm provides you with predefined settings in
To deploy a locally installed project to the Vagrant server, you need to configure auto deployment in PhpStorm. Make sure you are using the developer version of Shopware which can be downloaded from GitHub.
git clone https://github.com/shopware/shopware.git
Open your Shopware project in PhpStorm.
Choose in your toolbar
Now we add our new Vagrant machine as deployment target.
Choose a unique name and the "SFTP" type.
Fill in all required fields.
Now press OK to save your settings. If you configured your deployment machine successfully, you will now be asked to add the RSA key to your known hosts. Press Yes. After that, you should get a success message.
After adding your deploy machine, you have to create a mapping between the local and remote files.
Switch to the Mappings directory and press the "..." near
Deployment path. Choose
/home/vagrant/www/shopware. If the shopware directory doesn't exists, create it here with a right click.
Now press OK and close all deployment windows, so that you are back in your default IDE view.
Right click on your document root directory and click on
Upload to Vagrant Deployment
You can enable the automatic upload function so you don't have manually upload your files every time you change them:
Tools > Deployment > Automatic Upload.
Now that we uploaded Shopware onto the Vagrant box, we have to configure and install the development edition of Shopware.
Connect to your Vagrant machine via ssh using the
vagrant ssh command
$ vagrant ssh $ cd /home/vagrant/www/shopware/build
$ ant configure
After you get the
BUILD SUCCESSFUL message you can run the full build command.
$ ant build-unit
Download the test images and extract them into your Shopware's root directory.
$ cd .. $ wget -O test_images.zip http://releases.s3.shopware.com/test_images.zip $ unzip test_images.zip $ php bin/console sw:media:migrate $ php bin/console sw:thumbnail:generate
Your Shopware installation is now complete and can be accessed at http://192.168.33.10/shopware.
To open the backend, add
/backend to your URL so it becomes http://192.168.33.10/shopware/backend. You can then login using the default user credentials demo/demo.