Magento 2 Sample Data: Step-by-Step Guide

0

 

Magento is the most popular CMS for ecommerce stores that offers many useful features to customize store performance, thus helping store owners provide a great experience to their customers.


People in the Magento community often ask about the Magento sample data. In this blog, you will learn to install Magento 2 sample data on your ecommerce store for testing performance and scalability – the two major aspects of any successful online store.

Let’s begin.

First of all, you must understand what Magento Sample Data is all about.

In this article, I’ll show you an easy way to clean your Magento database.

What is Magento 2 Sample Data?

Magento sample data provides online store owners with a storefront powered by the Luma theme. It works like a typical Magento storefront and helps store owners manipulate pricing, inventory, promotional pricing rules from the Magento Admin Panel.

There are three important factors that an online store owner must consider before opting for any ecommerce platform. These factors include performance, user experience, and scalability. The ecommerce store must have a certain number of products in stock to test store performance. Magento 2 sample data allows you to add around 250 products under different categories for testing the store’s performance.

Now, it is time to learn to install Magento sample data.

Install Magento 2 Sample Data

1. Launch SSH terminal to connect your Magento store

2. Navigate to the root directory (public_html) of your Magento 2 store.

root directory magento 2 sample data

3. Run the following CLI command to install Magento 2 sample data.

php bin/magento sampledata:deploy

deploy magento 2 sample data

4. To authenticate from repo.magento.com, enter your username, and password.

authenticate magento 2 sample data

5. Log in to your Magento marketplace account and click My Profile on the top right corner of the page.

click on my profile magento 2 sample data

6. Click  Access Keys in My Products section under the Marketplace tab.

click on acess keys magento 2 sample data

If you already have an access key, you can use that. Otherwise, you must create a new key. For this purpose, click Create A New Access Key.

create a new access key magento 2 sample data

You will get two types of keys: a public and a private one.

  • Public Key: Use this public key as your username.
  • Private: Use this private key as your password.

7. Go  back to the SSH terminal and enter your username, password and Type ‘Y’:

authenticate yes magento 2 sample data

8. Hit  Enter to start the Magento 2 sample data installation process.

hit enter magento 2 sample data

Note: If you get a memory error message, run the following command.

php -d memory_limit=2G bin/magento sampledata:deploy

9. After successfully installing Magento 2 sample data, run the following commands one by one.

  1. php bin/magento setup:upgrade
  2. php bin/magento setup:di:compile
  3. php bin/magento setup:static-content:deploy -f

10. Navigate to your store’s front page.

magento 2 sample data installed

Congratulations! You have successfully installed Magento Sample data.

Post a Comment

0Comments
Post a Comment (0)
To Top