• Stars
    star
    204
  • Rank 185,288 (Top 4 %)
  • Language
    PHP
  • License
    Open Software Lic...
  • Created almost 9 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Magento 2 Sample Data

Magento sample data includes a sample store, complete with more than 250 products (about 200 of them are configurable products), categories, promotional price rules, CMS pages, banners, and so on. Sample data uses the Luma theme on the storefront.

Installing sample data is optional.

Technically, sample data is a set of regular Magento modules, which can be deployed and installed together with the Magento instance, or later in the scope of upgrade.

Deploy Sample Data

You can deploy sample data from one of the following sources:

  • From the Magento composer repository, optionally using Magento CLI
  • From the Magento GitHub repository

If your Magento code base was cloned from the master branch, you can use either source of the sample data. If it was cloned from the develop branch, use the GitHub repository and choose to get sample data modules from the develop branch.

Deploy Sample Data from Composer Repository

To deploy sample data from the Magento composer repository using Magento CLI:

  1. If your Magento instance is already installed, skip this step. Otherwise, in the Magento root directory, run: # composer install.
  2. In the Magento root directory, run: # bin/magento sampledata:deploy. This command collects the dependencies from the suggest sections of the composer.json files of modules, which suggest to install sample data (like Magento_Catalog, Magento_Sales, and so on).

To deploy sample data from the Magento composer repository without Magento CLI:

  1. Specify sample data packages in the require section of the root composer.json file, for example:
{
    "require": {
        ...
        "magento/module-catalog-sample-data": "{version}",
        "magento/module-configurable-sample-data": "{version}",
        "magento/module-cms-sample-data": "{version}",
        "magento/module-sales-sample-data": "{version}"
        ....
    }
}

Where <version> is the version of the packages; it should correspond to the version of the Magento instance.

Each package corresponds to a sample data module. The complete list of available modules can be viewed in the [sample data GitHub repository] (https://github.com/magento/magento2-sample-data/tree/develop/app/code/Magento)

  1. To update the dependencies, in the Magento root directory, run: # composer update

Deploy Sample Data from GitHub Repository

To deploy sample data from the GitHub repository:

  1. Clone sample data from https://github.com/magento/magento2-sample-data. If your Magento instance was cloned from the master branch, choose the master branch when cloning sample data; choose the develop branch if Magento was cloned from develop.
  2. Link the sample data and your Magento instance by running: # php -f <sample-data_clone_dir>/dev/tools/build-sample-data.php -- --ce-source="<path_to_your_magento_instance>"

Install Sample Data

Once the sample data is deployed, it will be installed automatically when you install or upgrade your Magento instance by using the command line.

Uninstall Sample Data

To remove the sample data modules from the code base, run one of the following commands from the Magento root directory:

  • If sample data was deployed from the composer repository, run: # bin/magento sampledata:remove
  • If sample data was deployed from the GitHub repository and linked to your Magento instance, run: # php -f <sample-data_clone_dir>/dev/tools/build-sample-data.php – --command=unlink --ce-source="<path_to_your_magento_instance>"

To delete all the products and other entities provided by the sample data modules, delete the database and reinstall Magento with a clean database.

Reinstall Sample Data

If you have deleted certain entities provided by sample data and want to restore them, take the following steps:

  1. From the Magento root directory, run the following command: # bin/magento sampledata:reset
  2. Upgrade Magento as usual.

The deleted sample data entities will be restored. Those entities, which were changed, will preserve these changes and will not be restored to the default view.

Documentation

You can find the more detailed description of sample data manipulation procedures at http://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-sample-data.html

More Repositories

1

magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
PHP
11,158
star
2

pwa-studio

🛠Development tools to build, optimize and deploy Progressive Web Applications for Magento 2.
JavaScript
1,030
star
3

devdocs

Magento Developer Documentation
Ruby
666
star
4

magento2-phpstorm-plugin

PHPStorm Plugin for Magento 2
Java
422
star
5

data-migration-tool

Magento Data Migration Tool
PHP
335
star
6

magento-coding-standard

Magento Coding Standard
PHP
330
star
7

inventory

Magento Inventory Project (a.k.a MSI)
PHP
327
star
8

architecture

A place where Magento architectural discussions happen
269
star
9

magento-cloud-docker

All Submissions you make to Magento Inc. (“Magento") through GitHub are subject to the following terms and conditions: (1) You grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission") you submit through GitHub. (2) Your Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3) You agree to the Contributor License Agreement found here: https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html
PHP
244
star
10

marketplace-eqp

Magento 1.x Coding Standard
PHP
226
star
11

magento-cloud

Magento Cloud
PHP
198
star
12

baler

AMD module bundler and preloader for Magento 2 stores.
JavaScript
175
star
13

m2-devtools

Helpful in-browser debugging/inspection tools for the Magento 2 Front-End
TypeScript
166
star
14

magento2-functional-testing-framework

Magento2 Functional Testing Framework
PHP
154
star
15

quality-patches

PHP
132
star
16

graphql-ce

[ARCHIVED] Please use magento/magento2 project
PHP
132
star
17

ece-tools

All Submissions you make to Magento Inc. (“Magento") through GitHub are subject to the following terms and conditions: (1) You grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission") you submit through GitHub. (2) Your Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3) You agree to the Contributor License Agreement found here: https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html
PHP
108
star
18

magento2-samples

[ONLY Magento 2.0.x Compatible] Code samples for Magento developers
PHP
69
star
19

magento2-page-builder

Magento2 PageBuilder
JavaScript
66
star
20

security-package

Magento Security Extensions
PHP
65
star
21

adobe-stock-integration

Magento Adobe Stock integration Community Project.
PHP
60
star
22

composer-root-update-plugin

PHP
53
star
23

community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46
star
24

merchdocs

Magento User Guide
Ruby
33
star
25

composer

PHP
32
star
26

backlog

Magento product backlog
31
star
27

magento-semver

Magento Semantic Versioning Checker. Join #svc in our Community Slack: https://opensource.magento.com/slack. Static tests that identify required module version changes based on code diff, and look for backward incompatible changes.
PHP
31
star
28

magento-cloud-patches

All Submissions you make to Magento Inc. (“Magento") through GitHub are subject to the following terms and conditions: (1) You grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission") you submit through GitHub. (2) Your Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3) You agree to the Contributor License Agreement found here: https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html
PHP
31
star
29

bulk-api-ce

Magento 2 CE repository dedicated for implementation of the Bulk API
30
star
30

m2-baler

PHP
29
star
31

meta-for-magento2

PHP
28
star
32

magento2-jp

Magento Community Project for providing best experience for Japanese market
PHP
23
star
33

magento-cloud-components

All Submissions you make to Magento Inc. (“Magento") through GitHub are subject to the following terms and conditions: (1) You grant Magento a perpetual, worldwide, non-exclusive, no charge, royalty free, irrevocable license under your applicable copyrights and patents to reproduce, prepare derivative works of, display, publically perform, sublicense and distribute any feedback, ideas, code, or other information (“Submission") you submit through GitHub. (2) Your Submission is an original work of authorship and you are the owner or are legally entitled to grant the license stated above. (3) You agree to the Contributor License Agreement found here: https://github.com/magento/magento2/blob/master/CONTRIBUTOR_LICENSE_AGREEMENT.html
PHP
23
star
34

magento2-upward-connector

Magento module for routing front-end requests to UPWARD-PHP
PHP
21
star
35

commerce-data-export

PHP
20
star
36

glossary

Magento Glossary Application
JavaScript
20
star
37

magento2-kubernetes-devbox

Shell
18
star
38

magento2-pwa

PHP
14
star
39

devdocs-m1

HTML
13
star
40

magento-eslint

Shared ESLint configuration for Magento PWA-related projects
JavaScript
13
star
41

upward-php

Implementation of UPWARD spec written in PHP
PHP
13
star
42

knowledge-base

Shell
12
star
43

ts-types

TypeScript Definitions for Magento 2
7
star
44

catalog-storefront

PHP
7
star
45

aep-launch

PHP
6
star
46

pagebuilder-docs

Page Builder development documentation
5
star
47

magento-japan-tax

PHP
5
star
48

graphql

TypeScript
5
star
49

module-grpc

PHP
5
star
50

storefront-message-broker

PHP
4
star
51

storefront-search-ce

PHP
4
star
52

app-builder-samples

JavaScript
4
star
53

pwa-tests

4
star
54

adobe-commerce-catalog-service

4
star
55

directive-parser

Parses Magento PWA Studio directives
JavaScript
3
star
56

composer-dependency-version-audit-plugin

validating packages through a composer plugin
PHP
3
star
57

marketplace-subscriptions

PHP
3
star
58

page-builder-types

Magento Page Builder Types
3
star
59

adobe-ims

PHP
3
star
60

devdocs-mbi

Magento Business Intelligence developer documentation
3
star
61

storefront-product-reviews-ce

PHP
2
star
62

storefront-pricing-ce

PHP
2
star
63

magento2devbox-web

PHP
2
star
64

php-proto-generator

A tool to generate Magento modules from proto definitions
PHP
2
star
65

mtf

PHP
2
star
66

inventory-composer-installer

PHP
1
star
67

devops-cla-test-public

1
star
68

magento-zend-pdf

PHP
1
star
69

magento-zend-memory

PHP
1
star
70

magento-zend-log

PHP
1
star
71

magento-zend-db

PHP
1
star
72

magento-zend-exception

PHP
1
star
73

magento-zend-cache

PHP
1
star
74

storefront-authentication-ce

1
star
75

magento2-pwa-commerce

1
star
76

magento-zend-loader

PHP
1
star
77

language-ja_JP

Japanese Language Pack for Magento 2 Resources
PHP
1
star