How can you install a Magento 2 quickly to last version with sample data with composer
Can you install a Magento2 last version with sample data with composer?
How can you install a Magento 2 quickly to last version with sample data with composer
Can you install a Magento2 last version with sample data with composer?
Run command to bring Magento2 from the repository:
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition magento
Add the credential for Username and Password for authentification on the terminal, your credential is in your Magento.com account after you logged in click here.
cd magento
Add Magento2 Sample Data with composer:
php bin/magento sampledata:deploy
Add the credential for Username and Password for authentification on the terminal, your credential is in your Magento.com account after you logged in click here.
Then rule the command for install Magento2 in terminal:
php bin/magento setup:install --base-url=http://domain.com/ --db-host=localhost --db-name=db_name --db-user=db_user --db-password=db_pass --admin-firstname=FirstName --admin-lastname=LastName [email protected] --admin-user=admin --admin-password=password --language=en_US --backend-frontname=admin --use-sample-data --magento-init-params=“MAGE_MODE=developer”
I've developed m2install tool for such purpose.
Generate your auth keys and put them into file ~/.composer/auth.json see more details
Run from command line:
m2install.sh -s composer -v 2.1.3 --sample-data yes
Link on GitHub project: https://github.com/yvoronoy/m2install