Magento

How to Flush, Enable, Disable Cache Command Line in Magento 2

Pinterest LinkedIn Tumblr

Here we going to learn about how to flush a Cache using command line in Magento 2. you can check bellow command. In Magento 2 has 12 type of cache by default. here we going to learn about 5 simple command follow all step.

1. To flush Magento 2 cache

  • Go to Magento root directory
  • Type:php bin/magento cache:clean and php bin/magento cache:flush
  • Finish! Go to your Magento store and check result.

2. Go inside of your project directory using command line

cd /Applications/MAMP/htdocs/magento2

In Magento 2, let try to show command line guide by php bin/magento, it will show like this:

In this guide, we will talk more about Cache management in command line.

3. Check cache status

First of all, let show cache status by the following command line:

Php bin/magento cache: status

Result of cache status

4. Clean Cache command line

php bin/magento cache:clean

5. Flush cache storage

php bin/magento cache:flush

6. Disable Cache command line

This command will disable all cache

php bin/magento cache:disable

if you want to disable specific cache type then you can run bellow command

php bin/magento cache:disable CACHE_TYPE

7. Enable Cache command line

Using below command you can enable all cache

php bin/magento cache:enable

if you want to enable specific cache type then you can run bellow command

php bin/magento cache:enable CACHE_TYPE

Write A Comment

Faster PHP Cloud Hosting