Magento 2: Install Sample Data Using Command Line

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

That’s it!

Hope this is useful for you 🙂

(Visited 5 times, 1 visits today)
Chandra Kumar

Hello World, I am Chandra Kumar from New Delhi, India. I am professionally developer, programmer and blogger. I am the founder of

0 Comment

Leave a Comment

Your email address will not be published. Required fields are marked *