Magento Tutorials

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!

Click to rate this post!
[Total: 4 Average: 5]
Dhiren Vasoya

Dhiren Vasoya is a Director and Co-founder at MageComp, Passionate 🎖️ Certified Magento Developer👨‍💻. He has more than 9 years of experience in Magento Development and completed 850+ projects to solve the most important E-commerce challenges. He is fond❤️ of coding and if he is not busy developing then you can find him at the cricket ground, hitting boundaries.🏏

Recent Posts

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

2 hours ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

2 hours ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

23 hours ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

2 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

4 days ago

How Upcoming Cookie Changes Will Affect Your E-commerce Website?

The e-commerce world is constantly in flux. New tech and strategies emerge daily to help…

4 days ago