Magento 2 reindex is to notify bots of the search engines about your new or updated information on your website, and that is the way you can rest assured that your online visitors will always see the latest updates on your website. It is imperative, really!! Magento 2 is indeed favored mainly for its complicated architecture, and it carries a lot of merchant’s data, and this makes your website fails to check the newest updates. Merchant’s data, like user details, product prices, sales price, coupons and catalog information, are distributed in many database tables. To optimize the look at the frontend, an indexer plays a vital role as it helps to store essential information within individual tables.
So, in this article, we will help you with how to reindex in Magento 2 by using the command line (CMI) and the admin panel.
Table of Contents :
Reindex Magento 2 is the best way of transforming data on the front end so that users can see it if there is any modification or changes on the website. Whenever you change the data, it is imperative to reindex that transformed data. Suppose, if you improve the price of a particular product from $6 to $7, Magento must reindex this change in price to make sure it reflects on your storefront.
In Magento 2, reindex is required for the below eight indexers when changes are made:
For older Magento versions, indexation depends on the index.php file. However, in Magento 2, it is managed by the bin/magento.
Also Read: A Short Guide On Magento 2 PWA And Integrating It In Magento 2
Reindexing in Magento 2 can be achieved by two methods, one from backend and other via SSH/Command line (CLI) way. One by one, we will learn each of both approaches.
The first one is the use of a command-line to reindex data. You can use this method when you need to issue reindexing data instantly. Here is what you need to follow:
Step 1: Log in to your store via SSH or CMI (Command Line)
Step 2: Navigate your root directory of your online store.
Step 3: Run the command: php bin/magento indexer:reindex
Step 4: Now, check the status of the indexers and identify indexers that need to be reindexed individually by using this command: php bin/magento indexer:status
Step 5: Check the list of indexers and the corresponding indexers status by using this command: php bin/magento indexer:info
Step 6: Reindex each indexer that has status “Reindex Required” by using this command: php bin/magento indexer: reindex [catlog_category_flat]
For reference: php bin/magento indexer: reindex catlogrule_rule
List of indexers:
Step 7: Follow step 4 to check index status again. You should get outpout as “Ready” for every indexers.
That’s all about how to reindex in Magento 2 by using the command line.
Reindexing of data from the admin panel with Magento 2 backend is another excellent way. Have a look at the below steps to know more.
Also Read: You Must Be Familiar With Magento 2.3.4 (Latest Update)
Update on Save Mode: In this mode, index tables are updated immediately after the dictionary data gets changed. When any save action gets complete, then the changes get caught, and the index gets updated. The index management page updates and flushes the reindex message within a short period.
Update by Schedule Mode: The index is set to update on schedule according to a cron job. The cron job includes the schedule interval for reindexing and writing updates to the index when run.
That’s all about how to reindex in Magento 2. With the help of this, Magento store owner can manage their store more efficiently and bring satisfaction to their customers. If you still find it challenging to do reindexing in Magento 2 or any further questions regarding this blog, then you can get in touch with Magento experts for any help. You can also drop a comment below, and we will make sure to solve your query.
Create New Account