{"id":3388,"date":"2024-01-25T07:30:34","date_gmt":"2024-01-25T07:30:34","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/how-to-reindex-in-magento-2\/"},"modified":"2025-01-02T10:01:55","modified_gmt":"2025-01-02T10:01:55","slug":"how-to-reindex-in-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/how-to-reindex-in-magento-2\/","title":{"rendered":"How to Reindex in Magento 2 from Admin &#038; CLI?"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Magento 2 (Adobe Commerce) has a complex architecture for storing data in various tables. Reading these databases on each page load can be time-consuming\u2013not ideal for optimum performance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Indexing is a feature that speeds up this process. And sometimes, you may need to reindex Magento 2 to reflect new changes in data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, learn what Magento 2 Reindex is also how to reindex in Magento 2 using <a href=\"https:\/\/meetanshi.com\/blog\/magento-2-ssh-commands\/\" target=\"_blank\" rel=\"noopener\">CLI command<\/a> and admin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Magento 2 Reindex?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Magento 2 Reindexing is the process of updating the index tables. Meaning it ensures that the latest data or changes in the core database are reflected on the frontend. It is an essential process for accuracy and <a href=\"https:\/\/meetanshi.com\/blog\/speed-up-magento-2\/\" target=\"_blank\" rel=\"noopener\">optimum website performance<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Generally, Magento 2 automatically reindexes data regularly or on save changes action, based on how you configured it. But sometimes, you may need to perform a manual reindex.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Magento 2 reindex is required for these 8 indexers when any changes are made:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Category products<\/li>\n\n\n\n<li>Product categories<\/li>\n\n\n\n<li>Product price<\/li>\n\n\n\n<li>Product entity attribute value<\/li>\n\n\n\n<li>Stock<\/li>\n\n\n\n<li>Catalog rule product<\/li>\n\n\n\n<li>Catalog product rule<\/li>\n\n\n\n<li>Catalog search<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How to Reindex in Magento 2 from Admin &amp; CLI?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Magento 2 allows you to perform a manual reindexing from the admin panel. Or you can also use the Magento 2 Reindex commands to do that. Both methods are effective ways to reindex Magento 2 data.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Reindex Magento 2 From Admin Panel:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the Magento 2 admin panel, you can set the indexers to update on schedule or save events. To reindex data in Magento 2, set the index update mode to <strong>Update by Schedule<\/strong>. Doing so will reindex the data during the following cron job.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the steps on how to reindex Magento 2 from admin panel.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the Magento 2 admin, go to <strong>System &gt; Index Management<\/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\/2024\/01\/1-index-management-in-magento-2.png\" alt=\"Index management in Magento 2\" class=\"wp-image-43180\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, the list of the indexers in Magento 2 will be displayed on the <strong>Index Management<\/strong> screen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Select the indexers that you want to reindex and select <strong>Update by Schedule&nbsp;<\/strong>in the top-left drop-down menu.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Click&nbsp;<strong>Submit&nbsp;<\/strong>to save the changes.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/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\/2024\/01\/2-update-indexers-by-schedule-to-perform-reindex.png\" alt=\"Reindex in Magento 2 on Cron job\" class=\"wp-image-43182\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, Magento 2 will reindex these indexers on the next cron job. (By default, the cron job runs every minute in Magento 2.)<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Reindex Magento 2 From CLI:<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The Magento 2 Reindex command allows you to reindex indexers from the command-line interface. Go to the root directory and run the following Magento 2 CLI reindex command:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>php binmagento indexer:reindex<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can replace the <code>indexer<\/code> value with a space-separated list of indexers you want to reindex.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Or to Magento 2 reindex all indexers, you can simply run the command: php binmagento indexer:reindex and you&#8217;ll get a status message like the one shown below.<\/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\/2024\/01\/3_reindex_results_png.webp\" alt=\"Magento 2 Reindex status\" class=\"wp-image-43187\"\/><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">That&#8217;s how you can reindex Magento 2 from the admin panel and CLI. Feel free to ask in the comments if you have any queries or doubts. I&#8217;d be happy to assist you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thanks for reading till the end. Please share this post with your developer friends on social media and online communities.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento 2 (Adobe Commerce) has a complex architecture for storing data in various tables. Reading these databases on each page load can be time-consuming\u2013not ideal&#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-3388","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/3388","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=3388"}],"version-history":[{"count":1,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/3388\/revisions"}],"predecessor-version":[{"id":5460,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/3388\/revisions\/5460"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=3388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=3388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=3388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}