cancel
Showing results for 
Search instead for 
Did you mean: 

Entering commands

SOLVED

Entering commands

HI,

after searching for days in the internet, one stupid(?) question: for re-indexing in magento 2 I have to enter commands, e.g.

 

php magento indexer:reindex

 

But where do I enter these commands (working on windows 10, xampp; website on localhost).

Thanks a lot

Helmut

2 ACCEPTED SOLUTIONS

Accepted Solutions

Re: Entering commands

Hi @helmut999

 

You have to setup php as environment variable.

 

Go to Control Panel > System>Advanced System Settings>Environment Variables

Click new

Variable name : path
Variable value : C:\xampp\php;

Click ok

 

Now you have to go to your Magento root directory, then run following command.

 

C:\xampp\htdocs\magento2 > php magento indexer:reindex

 

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

View solution in original post

Re: Entering commands

Hi,

Navigate to the Magento root directory and use the following command 

1. go inside the bin directory

cd bin

2. for indexer use the following command

php magento indexer:reindex

 

for cleaning cache:

php magento cache:clean 

 

for compile:

php magento setup:di:compile

 

for setup upgrade:

php magento setup:upgrade

View solution in original post

5 REPLIES 5

Re: Entering commands

Hi @helmut999

 

You have to setup php as environment variable.

 

Go to Control Panel > System>Advanced System Settings>Environment Variables

Click new

Variable name : path
Variable value : C:\xampp\php;

Click ok

 

Now you have to go to your Magento root directory, then run following command.

 

C:\xampp\htdocs\magento2 > php magento indexer:reindex

 

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: Entering commands

Hi,

Navigate to the Magento root directory and use the following command 

1. go inside the bin directory

cd bin

2. for indexer use the following command

php magento indexer:reindex

 

for cleaning cache:

php magento cache:clean 

 

for compile:

php magento setup:di:compile

 

for setup upgrade:

php magento setup:upgrade

Re: Entering commands

Hi Muk,

 

have done changes in system and then entered the command 'php magento indexer:reindex' in command prompt in the root directory. Message: php is not recognized as an internal or external command.

Re: Entering commands

Hi Muk,

is working now. In environment setting used the wrong window. And in the directory had to switch to cd bin

Thanks a lot.

Helmut

Re: Entering commands

Hi

Thank you very much. Together with Muk's advice (changing settings in system) it is working.

Helmut