Chat with us, powered by LiveChat

This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

Magento 2 Sample Data: Step-by-Step Guide

November 26, 2019

3 Min Read
Reading Time: 3 minutes

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.

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.

Scalable, Super Fast, & Secure Magento Hosting

Our clients love us because we never compromise on these features

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.

php bin/magento setup:upgrade
php bin/magento setup:di:compile
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.

Final Thoughts

The sample data helps store owners conduct tests – for performance and scalability – with ease. The process outlined in this blog will help you install Magento 2 sample data seamlessly. Using Magento sample data, you can add and delete products, try different payment options, and test server load as well.

In this tutorial, I have covered every aspect of Magento sample data installation for ecommerce stores. If you’re still confused about the process, feel free to drop your comment(s) below. I will get back to YOU!

Share your opinion in the comment section. COMMENT NOW

Share This Article

Boost Your Magento Store Performance by 5x Times & Maximize Your Sales

Our fastest Magento hosting can help you in growing your business revenue by 500%

Syed Muneeb Ul Hasan

Syed Muneeb Ul Hasan is a Magento Community Manager at Cloudways - A Managed Magento Hosting Platform. He is an expert in PHP and Magento and prefers to educate users in the implementation of Magento. When not working, he loves to play games and watch cricket.

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

BFCM 2019