O'Reilly logo

Magento 2 - Build World-Class online stores by Jonathan Bownds, Bret Williams, Vladimir Kerkhoff, Ray Bogman, Fernando J. Miguel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required