Magento can be setup in 4 different ways, here i’m touching just the 4th – through composer.

  1.  Composer create project, the final parameter is where it will be installed Magento. In my case “./”, it is in the current directory. 

During installation I got a series of problems, I’ll try to add them between steps so you know what it can happen, example:

Composer failing on Mac (OSX) with MAMP Pro with the following message

More about this error in this post: Composer – PHP Error

so it has to be run this command :

2. Follow the Web setup of your domain (my localhost domain is: mage.dev).

  • If after setup you get this error:

That means the static files were not generated and you have to go in command line (cli) and run the following command

Another encountered error was:

The solution was well described in this post on StackExchange which is :

  • Problem: No images, css or js files loading (404 error) –  after reaching this point and your website is still not accessible is seems there could have been an error on generating  in correct order the static files:

After permissions checks we have to generate the static files (thanks to Angelo’s tips)

3. Make sure you have the latest packages

4. To add the Sample Data make sure this configuration is present into composer.json :

 

4..1 Deploy sample data

 This step is a bit misleading as you get this message:

And my initial thought and action was to add my username  from https://magentocommerce.com but it doesn’t work so after a bit of research I found out I need in fact to get the magentocommerce.com > Connect > Secure Keys my Public and Private Key which are looking like this:

or in the new interface at
https://marketplace.magento.com/customer/accessKeys/list/

After that the installation of sample data went smoothly.

 

4.2. After deploy yo have to run:

5. Developing in Magento (Set the Mode, enable URN for PhpStorm)