I'm getting this error on my dashboard and when i try to reindex through command line via this command from my magento root directory.
/var/www/html/magento
then
php bin/magento indexer:reindex
so it is giving me an error, see it below
Could not open input file: bin/magento
Please help me, because many things are not working properly even my theme.
Thank you!
Best Answer
try this topic. To summarize, you must set up 3 cron jobs:
*/1 * * * * <path-to-binary> -c <ini-file-path> <your Magento install dir>/bin/magento cron:run [>> <log-file>&] */1 * * * * <path-to-binary> -c <ini-file-path> <your Magento install dir>/update/cron.php [>> <log-file>&] */1 * * * * <path-to-binary> -c <ini-file-path> <your Magento install dir>/bin/magento setup:cron:run [>> <log-file>&]
For example,
*/1 * * * * /etc/php -c /etc/php.ini /var/www/html/magento2/bin/magento cron:run >> /var/www/html/magento2/var/log/cron.log&] */1 * * * * /etc/php -c /etc/php.ini /var/www/html/magento2/bin/update/cron.php [> /var/www/html/magento2/var/log/update.log&] */1 * * * * /etc/php -c /etc/php.ini /var/www/html/magento2/bin/bin/magento setup:cron:run [> /var/www/html/magento2/var/log/setup-cron.log&]
You don't have to do anything to get cron to run; it runs on its own.