1

I installed magento 2.1.9 on my shared hosting account. A system error message appears within the admin panel that states: "One or more indexers are invalid. Make sure your Magento cron job is running."

Below is a screenshot of the cron jobs I have:

enter image description here

Any idea if anything is wrong with my cron job? And how can I fix this issue within cPanel's cron job, without having to mess with command line?

An Update: Today my hosting provider informed me that I cannot be given SSH login details, since I'm on shared hosting environment. What is the way to update the indexer manually on a shared hosting environment, without SSH access?

  • Can you please check the commands add in Cpanel, are working on manaual running? – Amit Bera Oct 1 '17 at 18:20
  • Thanks for your input. Sorry, I cannot check manually, since I don't have the SSH login details to gain access. – Justin Oct 2 '17 at 4:57
0

You should set up cron for reindexing like this:

* * * * * /usr/bin/php [path_to_document_root]/bin/magento indexer:reindex >> [path_to_document_root]/var/log/indexer.cron.log

Where:

* * * * * - time

/usr/bin/php - path to the php

Edit: If you don't know where the PHP binary exists on the server, you can use these commands to know the path of PHP:

which php

or

whereis php

Please let me know if you find any problem.

  • Thanks for your insight. I will try it and see if it works, and then get back to you. – Justin Oct 4 '17 at 11:26
  • the cron job is not working – Justin Oct 5 '17 at 8:44
  • the issue persists. Please, do you have any other idea how I can fix this on a shared hosting environment, since I don't have SSH login details to run any command? – Justin Oct 9 '17 at 12:46

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.