Other than the installation of the sample data, you can also add data to your site after the software is set up. There are two methods to achieve this particular sample data;
The installation of sample data is possible whenever you will have the Magento software in the following ways;
If you are done with the downloading process of the archive from GitHub, it will not work because of the composer.json file doesn’t contain the repo.magento.com URL.
You may use this method to get the sample data for either Magento open source or the commerce, but you must use the authentication keys, for the installation of Magento.
You may also use Composer for installing the sample data, either before or after the installation of Magento. Moreover, there are some tasks available. Such as;
The authentication error might be the following:
The 'https://repo.magento.com/packages.json' URL required authentication.
You must be using the interactive console to authenticate
If the error comes, then you have to change to your Magento installation directory and run composer update. It will prompt you for your authentication keys.
Once you are done with the download of sample data packages, you have to log in or switch to your Magento server, the Magento file system owner and then enter the following command in <magento_root> folder;
In this topic, we are going to know how to clone and add Magento 2.3 Sample Data if you cloned the Magento GitHub repository. This method is only useful for contributing developers, i.e. developers who plan for the contribution of Magento 2 codebase.
In case, if you are not a contributing developer, choose one of the other options displayed in the table of contents present on the left side of the page. Contributing users can use the method of Magento 2.3 Install Sample Data in the following ways;
Here, we will discuss the installation of Magento Sample data by cloning the sample data. For this, we can use the following steps;
For cloning the Magento Sample data, the GitHub repository is using the SSH protocols.
git clone email@example.com:magento/magento2-sample-data.git
Cloning into 'magento2'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Php -f <sample-data_clone_dir>/dev/tools/build-sample-data.php -- --ce-source="<path_to_your_magento_instance>"
The following are the steps for cloning the Magento sample data GitHub repository using the HTTPS protocol.
Here also, for CentOS, it is www/html/var and for Ubuntu, it is var/www.
php -f <sample-data_clone_dir>/dev/tools/build-sample-data.php -- --ce-source="<path_to_your_magento_instance>"
If the Magento 2 Sample Data Not Showing up even after the complete installation process, then you can also Remove Magento Sample Data and again reinstall those sample data after installation.
Here, data is being used by the Magento named as Sample data. Magento Sample Data includes a sample store. It consists of more than 250 products (about 200 of them are considered as configurable), CMS pages, banners, categories, and promotional price rules. Technically, this Sample data is defined as a set of regular Magento modules that can be deployed and installed together with the Magento instance.