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
0

you can download cmder for better use of commands.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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