cancel
Showing results for 
Search instead for 
Did you mean: 

One or more indexers are invalid. Make sure your Magento cron job is running.

SOLVED

One or more indexers are invalid. Make sure your Magento cron job is running.

i have jsut installed

magento 2.0.4

on wamp 3 with php 7.0.4

on a windows 7 machine.

 

researching the solution is to  place in the cli

php magento indexer:reindex

 

the problem is i do not know how to get to the cli, saw a tutorial on a app called mage but i cna not find it in my install.

 

my doc root is c:\sites\www\asite.com\magento

 

can someone give me a map of instructions to complete indexing and/or create a cron job.

 

thanks 

craig

6 REPLIES

Re: One or more indexers are invalid. Make sure your Magento cron job is running.

How to reindex Magento 2 data from the command line? https://mage2.pro/t/163
How to setup and run cron for Magento 2? https://mage2.pro/t/32

Re: One or more indexers are invalid. Make sure your Magento cron job is running.

Hi @zpupster

 

On windows environment you have to set php as environment variable to be able to run the command from console.

 

Try following  to set up the php as environment variable. (How to set the env variable for PHP?)

System>Advanced  System Settings>Environment Variables
Click new

Variable name  : path
Variable value : c:\wamp\bin\php\php5.3.13\

Click ok

Once you do this you will be able to run the Magento re index command.

 

Go to Magentto root from command line and run following command.

 

php bin/magento indexer:reindex

For cron job creation you have to create a scheduled job in the windows.

It is better to use Linux for the development (You can set up Magento on virtual box also)

 

 

 

---
Problem Solved Click Accept as Solution!:Magento Community India Forum

Re: One or more indexers are invalid. Make sure your Magento cron job is running.

this is my root magento : bin>magento

 

#!/usr/bin/env php
<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */

if (PHP_SAPI !== 'cli') {
    echo 'bin/magento must be run as a CLI application';
    exit(1);
}

try {
    require __DIR__ . '/../app/bootstrap.php';
} catch (\Exception $e) {
    echo 'Autoload error: ' . $e->getMessage();
    exit(1);
}
try {
    $handler = new \Magento\Framework\App\ErrorHandler();
    set_error_handler([$handler, 'handler']);
    $application = new Magento\Framework\Console\Cli('Magento CLI');
    $application->run();
} catch (\Exception $e) {
    while ($e) {
        echo $e->getMessage();
        echo $e->getTraceAsString();
        echo "\n\n";
        $e = $e->getPrevious();
    }
    exit(Cli::RETURN_FAILURE);
    
}

 

Whre i put this code : php bin/magento indexer:reindex

Re: One or more indexers are invalid. Make sure your Magento cron job is running.

when you use wamp in windows7 for magento, you can open the cmd run as administrator and type code below to fix that warning. (magento2 is project name)

 

C:\wamp\bin\php\php7.0.4>php C:\wamp\www\magento2\bin\magento indexer:reindex

 

Re: One or more indexers are invalid. Make sure your Magento cron job is running.

how to reindex when magento is installed in ftp ?

Re: One or more indexers are invalid. Make sure your Magento cron job is running.

I installed magento with softaculous installer and I dont know what to do to fix the problem. HELP ME PLEASE