Installing Magento 2 sample data via the command line

Installing Magento 2 via the shell is not new. In the current Magento version, it was already possible using the install.php file. The configuration looked like this:

/usr/local/bin/php -f install.php -- \ --license_agreement_accepted "yes" \ --locale "en_US" \ --timezone "America/Los_Angeles" \ --default_currency "USD" \ --db_host "mysql.example.com" \ --db_name "your_db_name" \ --db_user "your_db_username" \ --db_pass "your_db_password" \ --db_prefix "" \ --admin_frontname "admin" \ --url "http://www.examplesite.com/store" \ --use_rewrites "yes" \ --use_secure "no" \ --secure_base_url "" \ --use_secure_admin "no" \ --admin_firstname "your_first_name" \ --admin_lastname "your_last_name" \ --admin_email ...

Get Magento 2 - Build World-Class online stores now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.