Is there any way to install sample data from Zip file after successful installation of magento 2.3.5-p2?
-
14-04-2021 - |
Вопрос
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.
Решение
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.
Другие советы
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