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.
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.
3. Run the following CLI command to install Magento 2 sample data.
php bin/magento sampledata:deploy
4. To authenticate from repo.magento.com, enter your username, and password.
5. Log in to your Magento marketplace account and click My Profile on the top right corner of the page.
6. Click Access Keys in My Products section under the Marketplace tab.
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.
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’:
8. Hit Enter to start the Magento 2 sample data installation process.
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.
Congratulations! You have successfully installed Magento Sample data.
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!
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 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.