How can I Reindexing in Magento 2 on xampp server and My Oprating System is Windows 7.


4 Answers 4


To resolve below error:

'php' is not recognized as an internal or external command

Make sure your PHP path is added to your windows system's environment variable. After that you may able to run commands successfully.


1.open your cmd and run:
2.change your root directory from //Magento root directory//
3.change location of drive

D:\xampp\php\php.exe D:\xampp\htdocs\<Magento root directory>\bin\magento indexer:reindex

in your case it would be:

C:\xampp\php\php.exe C:\xampp\htdocs\magento_2.0\bin\magento indexer:reindex

Run the below Command


The execute the below command

php bin/magento indexer:reindex

  • 'php' is not recognized as an internal or external command, operable program or batch file.
    – H_Parekh
    Oct 4, 2016 at 10:55
  • 1
    getting above error
    – H_Parekh
    Oct 4, 2016 at 10:55
  • you have to run this command from magento root cd <magento_root> php bin/magento indexer:reindex
    – Brad Hodge
    Oct 4, 2016 at 11:04
  • @H_Parekh Thats because you don't actually have PHP CLI installed. You need to install PHP CLI. Oct 4, 2016 at 11:05
  • I am using "C:\xampp\htdocs\magento_2.0>php bin/magento indexer:reindex"
    – H_Parekh
    Oct 4, 2016 at 11:06

Goto in your project root directory like :

cd /your project folder path/

Then run the cmd :

php bin/magento indexer:reindex

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.