For quick and easy installation you can also use MAMP on Mac.
As a first step, please make sure you installed MAMP beforehand. You can download MAMP on this site.
First you have to modify the PHP settings inside MAMP as seen on the following screenshot:
After that start the mysql webserver-service with the toggle buttons on the left side in the MAMP management console.
Open the MySQL Tab on the left side and click on the PhpMyAdmin icon - if the icon is grayed out, check if the mysql and webserver services are running.
Inside PhpMyAdmin switch to the user account management on the top menu and click add new user.
Choose a username (e.g. shopware) and a password and set the option Create database with same name and grant all privileges. Also, set the option Check all in the Global privileges card. Afterwards, all checkboxes in this card should be checked.
Finish this step by clicking GO.
Next up, we need to make sure MAMP php binary is used globally on your CLI. Therefore we execute the following commands:
which php# /Applications/MAMP/bin/php/php7.2.14/bin/php < should be displayed# IF NOTvim ~/.bash_profileexport PATH=/Applications/MAMP/bin/php/php7.2.14/bin:$PATH# :wq to save the filesource ~/.bash_profile
Then you need to make sure MAMP mysql binary is used globally on your CLI:
which mysql# /Applications/MAMP/Library/bin/mysql < should be displayed# IF NOTvim ~/.bash_profileexport PATH=/Applications/MAMP/Library/bin:$PATH# :wq to save the filesource ~/.bash_profile
It's handy to use brew as a package manager. So we recommend you to install brew. Please open the terminal application again and run the command stated below:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Next step is installing NodeJS and NPM. Therefore you need to leave the terminal application open and use brew to install node:
brew install [email protected]
In order to install composer, please open the terminal application. Afterwards, execute the following command:
brew install composer
Before you're able to set up Shopware, you need to checkout Shopware's repositories. This is explained in the "Preparatory steps" paragraph of the Installation overview guide. Nevertheless, below you see a brief summary on this process:
# Choose your own directorycd ~/PhpstormProjects/mkdir shopwarecd shopwaregit clone https://github.com/shopware/development.gitcd developmentgit clone https://github.com/shopware/platform.git
First, add a new host in MAMP:
Hostname = shopware
Port = 8000
Document Root = Browse for the public directory inside the new directory that you used before (e.g. /PhpstormProjects/shopware/development/public)
As a next step, change the installation settings
# Inside the shopware installation directory (e.g. /PhpstormProjects/shopware/development)bin/setup
You will be prompted to enter specific information. In short:
Application environment: Just hit enter to apply the default
URL to your /public folder:
Database host: Just hit enter to apply the default
Database port: Just hit enter to apply the default
Database name: Enter the name of your database that you created earlier,
shopware was suggested
Database user: Enter the name of your MySQL user, that you created previously
Database password: Enter the password of the new MySQL user
Afterwards a file called
.psh.yaml.override is created, which contains all those information you just entered.
# Inside the shopware installation directory (e.g. /PhpstormProjects/shopware/development)./psh.phar install
After that the setup is done. You can now access your Shopware 6 installation using the following urls:
Admin: http://shopware:8000/admin (User: admin, password: shopware)
There are cases when the administration is not build correctly and having error messages similar to these:
ERROR in foobar/vendor/shopware/storefront/Resources/app/administration/src/main.js Module Error (from ./node_modules/eslint-loader/index.js):
✘ https://google.com/#q=import%2Fno-unresolved Casing of ./modules/sw-theme-manager does not match the underlying filesystem foobar/vendor/shopware/storefront/Resources/app/administration/src/main.js:1:8
✘ https://google.com/#q=import%2Fno-unresolved Casing of ./extension/sw-sales-channel/page/sw-sales-channel-detail does not match the underlying filesystem foobar/vendor/shopware/storefront/Resources/app/administration/src/main.js:3:8
✘ https://google.com/#q=import%2Fno-unresolved Casing of ./extension/sw-sales-channel/view/sw-sales-channel-detail-theme does not match the underlying filesystem foobar/vendor/shopware/storefront/Resources/app/administration/src/main.js:4:8
✘ https://google.com/#q=import%2Fno-unresolved Casing of ./init/api-service.init does not match the underlying filesystem foobar/vendor/shopware/storefront/Resources/app/administration/src/main.js:6:8
The underlying problem is that Mac supports case-insensitive paths but not the tools that build the administration. Therefore, make sure to execute the commands in a context where the
pwd is written in the correct case.
❌ Not ok:
As you installed Shopware successfully, maybe you want to start writing your very own plugin. Head over to Plugin base guide to get a grip on that topic. Did you know you can install Shopware on Mac with the help of other tools? See the guides below: