0

I have installed Magento 2.3.5-p2. But after that i need to install sample data i exectute command

 - php bin/magento sampledata:deploy
 
  • But i got this .. Could not find a matching version of package magento/module-sales-sample-data. Check the package spelling, your version constraint and that the package is available in a stability which matches your minimum-stability (stable).

After that i have downloaded Zip file from mageplaza extract file and paste file in magento directory and execute command.

  • bin/magento setup:upgrade

I got Nothing to import.

Is there any other way to install sample data. i am using apache2, php 7.2. i have installed each thing sepratelly not any xampp, lamp etc.

0

2 Answers 2

0

You can install sample data as a official composer package. See the instructions on the dev docs: https://devdocs.magento.com/guides/v2.4/install-gde/install/sample-data-after-composer.html.

5
  • I have tried but i does not work for me or i am unable to understand how it works..
    – Usman
    Commented Oct 1, 2020 at 10:35
  • Ok then try the following approach: Clone sample data from 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. 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>". Replace sample-data_clone_dir with the directory where you have the sample data cloned and also replace path_to_your_magento_instance with Commented Oct 1, 2020 at 11:00
  • Also if your having issues after that, change the permissions chown -R www-data:www-data /var/www/magento2/magento2-sample-data/ , where www-data:www-data is the group. Commented Oct 1, 2020 at 11:03
  • thanks it solve my issue.
    – Usman
    Commented Oct 2, 2020 at 5:17
  • @Manii great to hear, please upvote the answer if it helped you. Commented Oct 2, 2020 at 6:25
0

I have tried another easiest way to install sample data and that also work for me so i want to share it may help some one ... i have downloaded sample data zip file from here https://www.mageplaza.com/download-magento/#download-Magento%202. and then extract it and copy everything inside the extracted directory and then past it in magento2 folder and execute the follwing commands.

  • bin/magento setup:upgrade
  • bin/magento sampledata:deploy

after that i resest permissions

  • chown -R www-data:www-data /var/www/html/magento2
  • chmod -R 777 /var/www/html/magento2 and then set rewrite mod
  • sudo a2enmod rewrite
  • service apache2 restart and my issue is resolved. Hope it may help someone

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.