{"id":197,"date":"2018-10-01T07:00:40","date_gmt":"2018-10-01T07:00:40","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2018\/10\/01\/magento-2-indexer-commands\/"},"modified":"2025-05-22T17:18:32","modified_gmt":"2025-05-22T11:48:32","slug":"magento-2-indexer-commands","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/magento-2-indexer-commands\/","title":{"rendered":"Useful Magento 2 Indexer Commands for Developers"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Magento stores are constantly updated with the addition of new products, category, changes in price rules, creating a catalog, etc. To ensure that the store viewers can view this changes, indexing is done. The Magento 2 Indexing is necessary to update the changes in store frontend as well.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Magento accumulates data into special tables using indexers in order to optimize the performance in the storefront. The indexing is an automatic process, set up by cron. However, it may be required to perform&nbsp;<i><strong>Magento 2 Indexer commands<\/strong><\/i>. Here, I\u2019ve tried to list out the commands to make the task of developers easier ?<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Magento 2 Indexer Commands:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">1. To show allowed indexer: <strong>php bin\/magento indexer:info<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2018\/09\/1_show-allowed-indexers.png\" alt=\"1_show-allowed-indexers\" class=\"wp-image-3575\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">2. To reindex data:&nbsp;<strong>php bin\/magento indexer:reindex<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2018\/09\/2_Reindex-Data.png\" alt=\"2_Reindex-Data\" class=\"wp-image-3576\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">3. To reset indexer status to invalid:&nbsp;<strong>php bin\/magento indexer:reset<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2018\/09\/3_Reset-indexer-status-to-invalid.png\" alt=\"3_Reset-indexer-status-to-invalid\" class=\"wp-image-3577\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">4. To set index mode type &nbsp;(real-time or schedule):&nbsp;<strong>php bin\/magento indexer:set-mode<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2018\/09\/5_Show-Index-Mode.png\" alt=\"5_Show-Index-Mode\" class=\"wp-image-3579\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">5. To show status of indexer:&nbsp;<strong>php bin\/magento indexer:status<\/strong><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2018\/09\/6_Shows-status-of-Indexer.png\" alt=\"6_Shows-status-of-Indexer\" class=\"wp-image-3580\" style=\"object-fit:cover\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Here you go!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Keep improving your Magento 2 store and update the changes by indexing using the indexer commands listed above.Happy Updating<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank You.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento stores are constantly updated with the addition of new products, category, changes in price rules, creating a catalog, etc. To ensure that the store&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-197","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/197","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=197"}],"version-history":[{"count":2,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/197\/revisions"}],"predecessor-version":[{"id":15591,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/197\/revisions\/15591"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=197"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=197"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}