System : Ubuntu 18 Application : Magento2.3 PHP : 7.1

I have two indexer need to be reindex. I have update the indexer on the admin page but it is not work. I also use the following command on the server :

php bin/magento indexer.reindex

but the system reply "Command indexer.reindex" is not defined"

I have gone to the root directory and the cron is working.

I don't know what the problem is ?

Please help......

4 Answers 4

php bin/magento indexer:reindex

: instead of .

Magento DevDocs


My problem has been solved. Let me show what the solution :

I tried different function of bin/magento such as "bin/magento setup" or "bin/magento cache" but it will show "There are no commands defined in the XXXXX namespace" I think it is the all function of bin/magento problem not only indexer. So, I run the following command :

$ php bin/magento list

They can not list the function and notice me some error. I think it is the access right problem so I change the owner to all folder again.

$ chown -R XXXX:www-data

Finally, all function of bin/magento are working.


you have to check your permissions try: sudo chown -R XXX:www-data /var/www cd /var/www chmod go-rwx /var/www chgrp -R www-data /var/www chmod -R go-rwx /var/www chmod -R g+rx /var/www chmod -R g+rwx /var/www sudo chown -R XXX:www-data /var/www/<magento folder>/ cd <magento folder>/public_html/ find var generated vendor pub/static pub/media app/etc -type f -exec chmod g+w {} + && sudo find var generated vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} + && sudo chown -R :www-data . && sudo chmod u+x bin/magento

Remember to Change XXX with your pc name, also it's: php bin/magento indexer:reindex : instead of .


please replace . to : in your command.

Follow this

php bin/magento indexer:reindex

Hope it is working fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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