Magento 2: How to Flush the Cache and Reindex from Command Line

Hello Magento Friends,

Welcome, all to Magento Tutorials by MageComp. Today I will be discussing the most common yet important topic for Magento merchants. Magento 2: How to Flush the Cache and Reindex from Command Line.

Managing cache improves the performance of your Magento 2 store. It is a good practice to flush the cache after installing a new extension or upgrading to the new version of Magento. Reindexing is required whenever any item or data is changed. Reindexing helps to speed up Magento store performance and reduces the time customers have to wait.

Let’s learn How to Flush the Cache and Reindex from Command Line in Magento 2

How to Flush the Cache and Reindex from Command Line in Magento 2?

Run the below command to flush Magento Cache Storage:

php bin/magento cache:clean

Run the below command to flush Magento Cache:

php bin/magento cache:flush

Run the below command to reindex the Magento site:

php bin/magento indexer:reindex

Run the below command to reindex specific id:

php bin/magento indexer:reindex catalog_category_product

Conclusion:

Hence, this was all about flush cache and reindex in Magento 2 via the command line. Contrary to this, integrate Quick Cache and Reindex Extension for Magento 2 to quickly flush cache and reindex any page of the Magento admin and eliminate the need of running the command

If you found the article useful, share it with others via social media accounts. Stay connected with us for the latest Magento updates.

Happy Reading!

Previous Article

How to Use Tab Widget in Magento 2

Next Article

How to fix Magento 2 500 internal server error

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Get Connect With Us

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨