In this tutorial, you will go through how to install sample data using command line(CLI) in Magento 2.
In Magento 2, If you want to install sample data using command line for your magento store. You can do this with magento command line. Suppose you want to use products with various options, attributes and others settings. This is very simple job for install sample data.
To install sample data using the command line, follow the below steps as the magento developer:
Step 1: First of all, You need to download and install the sample data using this command line:
php bin/magento sampledata:deploy
Step 2: If you’re installing sample data after installing Magento, you must also run the following command to update the database and schema:
php bin/magento setup:upgrade
Step 3: Clear Cache
php bin/magento cache:clear
Hope this is useful for you 🙂