How to fix one or more indexers are invalid error in Magento?

送分小仙女□ 提交于 2019-12-08 07:06:28

问题


Sorry if my question was very basic or simple one. But i m trying to fix this issue from yesterday. i hope my problem also similar to this question.

i m googling since yesterday and this is what the answer i got in every forums and search result.

php bin/magento indexer:reindex

but when i tried this in cmd.exe in Windows 7 this is what error i m getting.

i m not familiar with windows command prompt & magento, used to work on Ubuntu terminal. So please again sorry if my question is very basic or stupid but please help me to solve this issue.

please check magento dashboard error below :

sorry for my bad English too


回答1:


The PHP CLI as its called ( php for the Command Line Interface ) is called php.exe It lives in c:\wamp\bin\php\php5.x.y\php.exe ( where x and y are the version numbers of php that you have installed )

If you want to create php scrips to run from the command line then great its easy and very useful.

Create yourself a batch file like this, lets call it phppath.cmd :

PATH=%PATH%;c:\wamp\bin\php\php5.x.y
php -v

Save this into one of your folders that is already on your PATH, so you can run it from anywhere.

Now from a command window, cd into your source folder and run >phppath.

Then run

php bin/magento indexer:reindex

It should work like a dream.




回答2:


just create your folder path and add "bin" directory For example :

c:\wamp\www\Magento2.0\bin>

and execute below command for reindex all indexes.

php magento indexer:reindex


来源:https://stackoverflow.com/questions/35177542/how-to-fix-one-or-more-indexers-are-invalid-error-in-magento

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!