0

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......

asked Dec 30, 2018 at 14:56

4 Answers 4

1
php bin/magento indexer:reindex

: instead of .

Magento DevDocs

answered Dec 30, 2018 at 15:00
0

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.

answered Dec 31, 2018 at 4:11
0

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 .

answered Nov 8, 2021 at 9:06
0

please replace . to : in your command.

Follow this

php bin/magento indexer:reindex

Hope it is working fine.

answered Apr 12, 2022 at 5:50

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.