0

I'm new in Magento 2 I'm using XAMPP, Windows 10 and use CMD for Run Magento2 basic Commands, but I don' know how to use that in CMD, BCS when I have run this command

php magento indexer:reindex

give me an error like this: 'php' is not recognized as an internal or external command, operable program or batch file

My Magento 2 Path is : C:\xampp\htdocs\m231>

also, I have setup PHP as an environment variable.

Path = ;C:\xampp\php;

My Testing Commands:

C:\xampp\htdocs\m231> php magento setup:upgrade

'php' is not recognized as an internal or external command, operable program or batch file.

C:\xampp\htdocs\m231\bin> php magento setup:upgrade

'php' is not recognized as an internal or external command, operable program or batch file.

C:\xampp\htdocs\m231> magento indexer:reindex

'Magento' is not recognized as an internal or external command, operable program or batch file.

C:\xampp\htdocs\m231\bin> magento indexer:reindex

'Magento' is not recognized as an internal or external command, operable program or batch file.

but not working.

Please give me some solution.

Thanks.

2

2 Answers 2

2

Add C:\xampp\php to your PATH environment variable.

Then close your command prompt and restart again.

Note: Please close your command prompt and restart again otherwise changes will not be reflected.

If you like the answer please give thumbs up. :)

3
  • 1
    Yes Its Working Now. Thanks Commented Apr 28, 2020 at 8:49
  • How to run chmod permission commands on windows cmd? @Yo Yo Roshan Commented Nov 30, 2020 at 17:19
  • 1
    @zus Refer this -> educative.io/edpresso/what-is-chmod-in-windows Commented Nov 30, 2020 at 19:24
0

you can download cmder for better use of commands.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.