How to Fix “One or More Indexers Are Invalid” in Magento 2
While working with Magento 2, you may sometimes see the system message:
“One or more indexers are invalid. Make sure your Magento cron job is running.”
This warning usually appears in the Magento Admin panel and indicates that some indexers need to be rebuilt. Fortunately, the issue is quite common and can usually be resolved quickly.
In this guide, we will explain what this message means and how to fix the “one or more indexers are invalid” issue in Magento 2.
What Does “One or More Indexers Are Invalid” Mean?

Magento uses indexers to organize data into optimized tables that improve store performance. Instead of retrieving data directly from multiple database tables every time, Magento uses indexed data to speed up processes such as product search, category pages, and pricing calculations.
When changes occur in the system — for example:
- updating product information
- modifying categories
- changing inventory levels
Magento must reindex the affected data so that the storefront displays the latest information.
If the indexing process does not complete properly, Magento will mark those indexers as invalid.
Common Causes of the Error
There are several reasons why Magento may show the “one or more indexers are invalid” message.
1. Changes in Product or Catalog Data
When products, categories, or pricing rules are updated, Magento needs to rebuild the relevant indexes.
If the reindex process does not run automatically, the indexer status becomes invalid.
2. Magento Cron Job Is Not Running
Magento typically performs indexing automatically through scheduled cron jobs. If the cron job is not configured correctly, reindexing may fail or never run.
This is one of the most common causes of the error.
3. Interrupted Reindex Process
Sometimes the indexing process can be interrupted due to:
- server resource limits
- timeouts
- PHP memory issues
When this happens, the affected indexer may remain in an invalid state.
Steps To Fix One or More Indexers Are Invalid In Magento 2
Step 1: Check Indexer Status
Before fixing the issue, it is helpful to check which indexers are invalid.
Open your terminal and navigate to the Magento root directory. Then run the following command:
php bin/magento indexer:status
This command displays the status of all Magento indexers. Any indexer marked as Invalid needs to be rebuilt.
You can also check indexer status directly in the Magento Admin panel under System → Tools → Index Management.
Step 2: Run the Reindex Command
The simplest solution is to run the reindex process manually.
Execute the following command from the Magento root directory:
php bin/magento indexer:reindex
Magento will rebuild all indexes and update the data tables used by the storefront.
Once the process is complete, check the indexer status again to confirm that everything is updated.
Step 3: Check Magento Cron Jobs
Magento relies heavily on cron jobs to run scheduled tasks such as indexing.
If cron jobs are not running correctly, the indexers may repeatedly become invalid.
To check the cron status, run:
php bin/magento cron:status
You can also run cron manually to test it:
php bin/magento cron:run
If cron jobs are missing, you can install them using:
php bin/magento cron:install
After fixing cron jobs, Magento should automatically handle indexing tasks in the future.
Step 4: Reset Locked Indexers (If Needed)
In some cases, an indexer may become locked due to a failed indexing process.
You can reset a specific indexer using:
php bin/magento indexer:reset [indexer_code]
Then run the reindex command again:
php bin/magento indexer:reindex [indexer_code]
This forces Magento to rebuild the affected indexer.
Best Practice for Magento Indexing
To avoid frequent indexing issues in production environments, Magento recommends using the Update by Schedule mode for most indexers.
When this mode is enabled, Magento tracks data changes and processes reindex tasks automatically through cron jobs. This helps prevent heavy processing during page requests and keeps the store running smoothly.
You can manage indexers directly from the Magento Admin panel:
System → Tools → Index Management
On this page, you can:
- check the status of all indexers
- run reindex manually if needed
- change indexer mode between Update on Save and Update by Schedule
For most production stores, Update by Schedule is the recommended configuration because it allows Magento to handle indexing tasks in the background.
Final Thoughts
The “one or more indexers are invalid” message in Magento 2 is usually not a critical error. In most cases, it simply indicates that Magento needs to rebuild certain indexes after system changes.
Running the reindex command and ensuring that cron jobs are properly configured will usually resolve the issue.
By maintaining a healthy indexing process, you can ensure that your Magento store remains fast, accurate, and responsive.