I am installing magento2 in a LEMP stack, trough composer and command line.

Follow is the code I am using to install:

bin/magento setup:install 
--backend-frontname="adminlogin" \    
--db-host="localhost" \
--db-name="magentodb" \
--db-user="magentouser" \
--db-password="magentouser@" \
--language="en_US" \
--currency="USD" \
--timezone="America/New_York" \
--use-rewrites=1 \
--use-secure=0 \
--base-url="http://www.newmagento.com" \
--base-url-secure="https://www.newmagento.com" \
--admin-user=adminuser \
--admin-password=admin123@ \
[email protected] \
--admin-firstname=admin \
--admin-lastname=user \

Is there any parameter to force magento to install sample data?

1 Answer 1


After your Magento installation in order to install sample data using the command line, enter the following command as the Magento file system owner:

php <your Magento install dir>/bin/magento sampledata:deploy

Source: http://devdocs.magento.com/guides/v2.0/install-gde/install/sample-data-before-composer.html

  • that should be done after initial instalation?
    – IgorAlves
    Feb 28, 2017 at 15:05
  • yes after initial instalation Feb 28, 2017 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.