Here we’ll continue with the article, How to install sample data in Magento?
First in case you’re a developer who contributes we’ll refer you to install sample data using cloning repositories.
Also remember and don’t install Sample data in case the Mage App has been configured for Production Mode. Next switch to the Developer Mode because Sample Data in production mode results failure.
4. Now use the command line to install Sample Data. Here use the following command as a Mage system Admin.
php <our Magento install dir>/bin/magento sampledata:deploy
5. Also make a note that if you’re installing Sample Data after the Mage installation also run the following command. So it’ll update the DB and schema:
php <our Magento install dir>/bin/magento setup:upgrade
Now we need to authenticate to complete the action.
Right after we’ve completed our setup now we need to check for authentication. If everything goes right that’s good. But if we face some authentication error in that case we need to follow few steps to get rid of it. Here following are the authentication errors might arise and their solutions:
The 'https://repo.magento.com/packages.json' URL required authentication.
However, we’ve to use an interactive console to authenticate. For example if the error displays
In case such error, we’ve to change the Mage installation directory. Also we need to the run the composer update. Next it’ll prompt and ask our authentication keys.
Final Step – How to install sample data in Magento?
In this final step, we’ll complete the sample data installation. As we’ve already downloaded the Mage samples data packages. Now log in to the Mage server. Either we can also switch to Mage admin file system. Finally enter the following command to complete the setup using composer method:
php <your Magento install dir>/bin/magento setup:upgrade
Please read following article to setting up permissions for Mage after installing Sample data.
Now reading Part 02 | Part 01 |