Magento provides Sample Data for Magento 2.0 installation. Deploying Sample Data on Magento 2.0 is helpful if you want to try out Magento 2.0 and explore new features. Sample data is an additional package and can be installed over your existing installation via Magento 2.0 CLI. You could also deploy it via Magento GitHub repository.
Here’s what the Sample Data Contains:
- More than 250 products with about 200 products being configurable products.
- Promotional Prices
- CMS pages and promotional pages
- Banners and all other essential Store setup.
Prerequisites for Deploying :
- You must have Magento 2.0 installed.
- Shell Access to access Magento CLI
Deploying Sample Data on Magento 2.0 installation via CLI:
Navigate to bin directory and verify if Magento CLI is accessible by using[bash] php magento
Note: If you are doing this on shared hosting where or if your server’s default PHP version is less than 5.6 you might encounter an error.
In that case use full path of your php (greater than 5.6) installation[bash]/usr/local/php56/bin/php-cli magento[/bash]
Use the following command to deploy Sample Data.[bash]php magento sampledata:deploy[/bash]
If you are asked for authentication, enter your Public Key as username and Private key as Password. You could get these keys from MagentoConnect , Refer Installing Magento 2.0 for more information.
Errors while Deploying:
A simple fix for this would be editing your magento file and increasing your memory_limit. Just add the following line at the start of magento file and you are good to go.[php]ini_set(‘memory_limit’, ‘1024M’);[/php]
Alternate Ways to install
You could also download Magento installation archive from Magento Download Page with Sample Data.