I try to view or reindex the indexer by SSH. I get always the same response:

xxxx:/home/www/xxxx/html/shell > php -f indexer.php -- status all
X-Powered-By: PHP/5.6.5
Content-type: text/html; charset=UTF-8

Usage:  php -f indexer.php -- [options]

  --status <indexer>            Show Indexer(s) Status
  --mode <indexer>              Show Indexer(s) Index Mode
  --mode-realtime <indexer>     Set index mode type "Update on Save"
  --mode-manual <indexer>       Set index mode type "Manual Update"
  --reindex <indexer>           Reindex Data
  info                          Show allowed indexers
  reindexall                    Reindex Data by all indexers
  help                          This help

  <indexer>     Comma separated indexer codes or value "all" for all indexers

I can try out all the possible combinations. Still get the same "help" response. What jam doing wrong?

php indexer.php --status all
php indexer.php -status all
php indexer.php status all
php -f indexer.php --status all
php -f indexer.php -status all
php -f indexer.php status all

The same with "info" or "reindex" and the other commands.


I asked my hoster now. In newer PHP Versions (I use 5.6) and Configs it is helpful to type "php_cli" instead of "php".

php_cli indexer.php --status

To check the status of all indexes you must run the command without "all"

php -f indexer.php --status
  • Still the same. If I add NO whitespace between -- and status i get an error: Error in argument 3, char 2: no argument for option - – Lars Mar 4 '15 at 16:24
  • Without the "-f" ? Definitely must be "--status" Do you have permissions to run PHP over SSH on the server ? – Raphael at Digital Pianism Mar 4 '15 at 16:25
  • Without -f the same (And all other commands). I think so. If i use "php -v" i get the PHP Version...? – Lars Mar 4 '15 at 16:26
  • Try creating a test.php file on the server that just echo a message and execute it via SSH. If that works, then you definitely have the right to execute PHP over SSH. – Raphael at Digital Pianism Mar 4 '15 at 16:28

It's either that, or, you have multiple versions of PHP installed & the default 'php' namespace is hitting another PHP version that is failing to run the PHP file via SSH.

Get the path where your PHP is active and run it like so from the installation root of your Magento store:

/usr/local/bin/php shell/indexer.php reindexall

This calls 'php' from /usr/local/bin/ (where most hosts install it) and executes shell/indexer.php.

This should work in most cases.

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.