php bin/magento setup:install --base-url="http://localhost:8054/magento241/" --db-host="localhost" --db-name="magento" --db-user="root" --db-password="" --admin-firstname="admin" --admin-lastname="admin" --admin-email="[email protected]" --admin-user="admin" --admin-password="Admin@123" --language="en_US" --currency="INR" --timezone="Asia/Kolkata" --use-rewrites="1" --backend-frontname="admin" --search-engine=elasticsearch7 --elasticsearch-host="localhost" --elasticsearch-port=9200
Starting Magento installation:

all went well as per the doc mentioned here https://www.simicart.com/blog/how-to-install-magento-2-localhost/. but i got error like : enter image description here

php v 7.3 xamp os windows 10

tried : php bin/magento setup:static-content:deploy -f

but still it is same error.

2 Answers 2


As of Magento 2.4.2 the root www server document folder for Magento must be magento2/pub/.

Make sure you configure your web server to use this folder as the document root.

For example for Apache:

DocumentRoot /var/www/magento2/pub/

Note that Windows is not a supported operating system for Magento 2.


Create a symlink for pub/media and pub/static. In your magneto root folder run the following commands -

 ln -s pub/static
 ln -s pub/media

Now run the following commands -

sudo php bin/magento setup:upgrade
sudo php bin/magento setup:di:compile
sudo php bin/magento setup:static-content:deploy -f
sudo php bin/magento indexer:reset
sudo php bin/magento indexer:reindex
sudo php bin/magento cache:clean
sudo chmod -R 777 var pub
  • all good my bad. I am using windows 10. I need it for my development.
    Jul 14, 2021 at 18:42

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.