How to exploit all command in Magento 2 CLI (Part 1)

The following steps help you to exploit all command in Magento 2 CLI

Part 1: examine caches using CLI

Everyone knows Magento 2 has a powerful command-line interface tools (CLI). It permits you to complete task including installation, configuration, database backups, compiling LESS etc. Here I will show you how to How to exploit all command in Magento 2 CLI (Part 1).Before starting this guide please,refer our previous guidelines.

How to exploit all commands in Magento command line

Here are the following steps shows you how to exploit all command in Magento 2 CLI (Part 1 )

Step 1: analyze  position of all caches

php bin/magento cache:status

config: 1

layout: 1

block_html: 1

collections: 1

db_ddl: 1

eav: 1

full_page: 1

translate: 1

config_integration: 1

config_integration_api: 1

config_webservice: 1

You got the result

Step 2: Enable/disable cache

 <span style="font-weight: 400;">php bin/magento cache:enable [type] … type]</span>
<span style="font-weight: 400;">php bin/magento cache:disable [type] … type]</span>

 The below mentioned command enable the config cache & full page cache

php bin/magento cache:enable config full_page

The following commend disable the cache layout

<span style="font-weight: 400;">php bin/magento cache:disable layout</span>

Step 3: clean and flushes caches

php bin/magento cache:clean [type] ... [type]
php bin/magento cache:clean config translate

Flushes cache The following command clean config and translate the caches

<span style="font-weight: 400;">php bin/magento flush:clean [type] ... [type]</span>

The following command flushes full page

php bin/magento cache:flush full_page

Flushes all caches

php bin/magento cache:flush

The above mentioned steps are the smallest process for you to use all commands in Magento 2 (CLI). With the above guidelines, you can manage the commands in Magento 2 CLI effortlessly.






Leave a Reply

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