Magento 2 Reindexing - One or more indexers are invalid. Make sure your Magento cron job is running
to reindex in magento 2, go to the CLI and then the root folder of your magento installation and run the below command :
php bin/magento indexer:reindex
Run this command in your CLI
php bin/magento indexer:reindex
and if you want to reindex only one indexer then write following command:
php bin/magento indexer:reindex indexer_name.
where indexer_name
can be found by typing following command :
php bin/magento indexer:info
Here is how you can get things done using Magento 2 CLI indexing commands
Get into your Magento CLI command file available in Magento/bin directory cd magento_folder/bin and run your comamnd directly using magento in terminal or putty.
Here is how it will work for indexing in Magento 2
Get list of available indexer in Magento 2
php bin/magento indexer:info
How to check status of indexer
Following command will get you the status of all the indexer whether indexing is required or ready.
php bin/magento indexer:status
You can also check status of individual indexer: let say i want to check status of catalog_category_product
php bin/magento indexer:status catalog_category_product
How to reindex all available indexing in Magento 2
php bin/magento indexer:reindex
In case you fill memory limit, try this command
php bin/magento -dmemory_limit=2G magento indexer:reindex