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?

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

1 Answer 1

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.

3
  • Thanks for your insight. I will try it and see if it works, and then get back to you. Commented Oct 4, 2017 at 11:26
  • the cron job is not working Commented Oct 5, 2017 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? Commented Oct 9, 2017 at 12:46

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.