With a big catalog of 224+ extensions for your online store
How to Reindex in Magento 2 using command-line and backend interface
Indexing in Magento 2 is essential for improving storefront performance by updating and optimizing data. It involves reconstructing data stored in various database tables, including prices, users, and catalog data. As these data points change, reindexing ensures that the transformed data is current. This process helps store owners manage data modifications efficiently, reduces customer wait times, and boosts conversion rates.
In this article, you can learn more about reindexing in Magento 2 can be done through either the command-line interface (CLI) or the backend interface using Mageplaza plugins. Below are the instructions for performing a reindex Magento 2 using both methods.
How to Reindex in Magento 2
- Method 1: Reindex data via the command line
- Method 2: Reindex data from Admin panel
- Method 3: Reindex data from Admin panel with Magento 2 Backend Reindex
Method 1: Reindex data via the command line
The first method is using the command line to reindex data. Initially, let me show you reindex commands in Magento 2.
Reindex Commands
indexer
indexer:info Shows allowed Indexers
indexer:reindex Reindexes Data
indexer:reset Resets indexer status to invalid
indexer:set-mode Sets index mode type
indexer:show-mode Shows Index Mode
indexer:status Shows status of Indexer
How to Run Reindex Command Line
Now, I will instruct you to run the reindex command line with ease. After going to Magento root folder, run the following:
php bin/magento indexer:reindex
Result:
Design Config Grid index has been rebuilt successfully in 00:00:00
Customer Grid index has been rebuilt successfully in 00:00:00
Category Products index has been rebuilt successfully in 00:00:00
Product Categories index has been rebuilt successfully in 00:00:00
Product Price index has been rebuilt successfully in 00:00:00
Product EAV index has been rebuilt successfully in 00:00:01
Catalog Search index has been rebuilt successfully in 00:00:01
Stock index has been rebuilt successfully in 00:00:00
Catalog Rule Product index has been rebuilt successfully in 00:00:00
Catalog Product Rule index has been rebuilt successfully in 00:00:00
You may check indexer status by the following command:
php bin/magento indexer:status
How to Reset indexer status to invalid
php bin/magento indexer:reset
How to Show Index Mode
php bin/magento indexer:show-mode
Result:
$ php bin/magento indexer:show-mode
Design Config Grid: Update on Save
Customer Grid: Update on Save
Category Products: Update on Save
Product Categories: Update on Save
Product Price: Update on Save
Product EAV: Update on Save
Catalog Search: Update on Save
Stock: Update on Save
Catalog Rule Product: Update on Save
Catalog Product Rule: Update on Save
How to set index mode type
php bin/magento indexer:set-mode {realtime|schedule} [indexer]
E.g:
magento indexer:set-mode schedule catalog_category_product catalog_product_category
You may check indexer status by the following command:
php bin/magento indexer:status
While the first method can be done by using code, if you are not sure about your coding skills, scroll down to see the quick and ultimate solution from quick and ultimate solution from us.
Method 2: Reindex data from Admin panel
In this method, we will help you to find a swift and scientifically sound approach to reindexing data in Magento 2. Leveraging the Admin panel, we ensure a seamless process that allows users to instantly apply the necessary updates.
Login to Magento 2 Admin: Access the Magento 2 Admin panel and navigate to the System
tab. From there, select Index Management
to proceed to the next step.
Navigate to Index Management: Upon entering the Index Management
section, a comprehensive panel will be displayed. Here, carefully observe the available indexers.
Select Indexers Requiring Reindexing: Identify indexers with the status Reindex Required
. Efficiently select these indexers to streamline the reindexing process.
Utilize the Actions Menu: Within the panel, locate the Actions
menu. From the dropdown, choose Update by Schedule
. This action is pivotal in automating the reindexing process.
Apply Changes: After selecting the desired indexers and specifying the update schedule, press the Submit
button to implement the changes. This step ensures that the selected mode is applied to the chosen indexers.
Automatic Reindexing on Cronjob Task: Following the submission, your selected indexers are now configured to automatically reindex during the next cronjob task. This mechanism is expedited due to the default cron task, which runs every minute.
Method 3: Reindex data from Admin panel with Magento 2 Backend Reindex
In this part, I will give you another choice to reindex data easily with the support of the Mageplaza Backend Reindex extension which allows store admins to reindex data from the admin backend without the help of developers.
The problems arising from Reindex in Magento Default
In the default configuration of Magento 2, whenever changes are made to the store’s database, it is necessary to reindex the data either through the command line or by setting up a cron job. However, not all store administrators possess sufficient coding expertise, which can lead to confusion and mistakes during the reindexing process. Moreover, this process is time-consuming and can have a negative impact on the storefront.
The solutions with Mageplaza Backend Reindex
The Mageplaza Backend Reindex extension offers effective solutions to simplify and expedite the reindexing process in Magento. This extension enables store administrators to effortlessly reindex data manually from the admin backend at any time, eliminating the need for developer assistance. Additionally, in situations where all store data undergoes changes, store admins can reindex all data with just a single click. With the ability to handle large amounts of data, Magento websites can operate seamlessly even with updates.
The configuration of Mageplaza Backend Reindex
From the Admin panel, go to SYSTEM > Index Management
. To the right, the Index Management
grid is shown below:
- Reindex one indexer
To reindex each indexer in Magento, follow these steps:
- Locate the Actions column: Look for the column labeled “Actions” on the right-hand side of the screen.
- Click on the Reindex Data button: In the Actions column, find the Reindex Data button associated with each indexer you want to reindex. Click on this button for each indexer that needs to be reindexed. By following these steps, you can initiate the reindexing process for each indexer individually in Magento.
- Reindex some indexers
To reindex multiple indexers in Magento, follow these steps:
- Select the indexers: Click to select the indexers that you want to reindex. You can do this by ticking the checkboxes next to the respective indexers.
- Choose the reindex action: In the Action box, select “Reindex Data.” This option is usually available as a dropdown or a button.
- Submit the reindex request: Click the Submit button to initiate the reindexing process for the selected indexers. By following these steps, you can reindex multiple indexers simultaneously in Magento.
- Reindex all the indexers
To update all your store databases in Magento, follow these steps:
- Locate the Mass Action box: Look for the
Mass Action
box in the top left corner of the grid. - Choose the Select All option: In the
Mass Action
box, click to select theSelect All
option. This will select all the items in the grid. - Click the
Submit
button: Once you have selected all the items, click theSubmit
button to initiate the update process. By following these simple steps, all your store databases will be updated, ensuring they are ready and up-to-date.
What can Mageplaza Backend Reindex help your store?
- Allow you to set up reindex without any coding, so it is easy to execute for all admins
- One-click action to mass update saves time and effort, which enhances user experience
- Reindex notifications show the updates process in a timely and clear for better result tracking
- Restrict Admin roles in reindexing access to help protect your store data
Read more: How to Unlock Reindex Process in Magento 2
Conclusion
The above instructions provide a comprehensive guide to reindexing data in Magento, whether through the command line or using Mageplaza Backend Reindex. This extension simplifies the reindexing process by allowing store admins to conveniently perform the task directly from the admin panel, eliminating the need for complex coding. By utilizing Mageplaza Backend Reindex, store admins can effectively manage their stores, enhance the storefront, improve customer satisfaction, and boost sales.
If you have any further questions or need assistance, please feel free to contact us our enthusiastic support team. We are dedicated to providing you with the best service possible.
Looking for Magento Development Company?
8+ years of experiences in e-commerce & Magento has prepared us for any challenges, so that we can lead you to your success.
Get free consultantRecent Tutorials
How to insert Order Attributes to Transactional Emails
How to insert Order Attributes to Transactional Emails
How to add Order Attributes to PDF Order Template
Explore Our Products:
People also searched for
- reindex magento 2
- how to reindex magento 2
- magento 2 reindex command
- how to reindex in magento 2
- php bin/magento indexer:reindex
- reindex magento 2 command line
- magento 2 rebuild indexes
- magento 2 reindex command line
- reindex command magento 2
- magento 2 how to reindex
- reindex magento 2 command
- magento reindex command
- magento 2 reindex cli
- reindex magento
- magento 2 indexer reindex command line
- reindexar magento 2
- magento 2 indexer reindex
- magento 2 reindex order grid
- magento 2 reindex console
- magento reindex
- magento 2 reindex all
- reindex required magento 2
- reindex in magento 2
- reindexing in magento 2
- 2.3.x, 2.4.x
Stay in the know
Get special offers on the latest news from Mageplaza.
Earn $10 in reward now!