Hello Magento Friends,

In this blog, I will explain How to Reindex Specific Products Programmatically in Magento 2.

Reindexing specific products in Magento 2 is a useful task when you want to quickly update product information in the search index, category listings, or other areas without reindexing the entire catalog. Reindexing specific products can help improve the performance and accuracy of your Magento 2 store.

Let’s check out the process for reindexing specific products programmatically in Magento 2.

Steps to Reindex Specific Products Programmatically in Magento 2:

Step 1: Create a custom PHP script like reindex_products.php

Reindex the Specific Product(s).

You can get loop through the product SKU(s) and trigger the reindexing process for each product.

Step 2: Execute the Script

Save the script and execute it via the command line using PHP:

Here is the Screenshot:

reindex specific product


That’s it! You’ve successfully reindexed specific products in Magento 2. This process can help you keep your product data accurate and up-to-date without the need for a full reindex, which can be time-consuming on large catalogs.

To perform reindexing of the whole store check the below articles,

In case you find difficulty in performing reindexing  of specific products in Magento 2, you can share with me through the comment section and I will be quick to respond to you with the solution.

Happy Coding!

Click to rate this post!
[Total: 0 Average: 0]