I am trying to reindex using the following command from public_html folder (root directory):

php bin/magento indexer:reindex

I have even tried

bin/magento indexer:reindex

I receive the following message:

Magento supports PHP 5.0 or later ...

Another error message:

-bash: bin/magento: Permission Denied.

I am not a programmer. Could someone kindly explain in simple words how to solve this. Many thanks!

  • What is your PHP version? Enter the command php -v to get this.
    – PY Yick
    Commented Oct 11, 2017 at 2:30
  • Try sudo php bin/magento indexer:reindex
    – Magento 2
    Commented Oct 11, 2017 at 3:45
  • First upgrade your php version higher than your latest magento version.
    – Nikul
    Commented Oct 11, 2017 at 7:58

1 Answer 1


It seems permission issue on bin/magento folder. To fix this issue, execute below command to add permission for the bin/magento.

chmod u+x bin/magento

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.