How to Clear Cache Manually In Magento 2 –

Clearing the cache in Magento 2 can help improve website performance and ensure that new changes or updates are reflected on the site. Here’s how to manually clear the cache in Magento 2:

  1. Connect to your server via SSH.
  2. Navigate to the Magento 2 root directory using the cd command.
  3. Run the following command to see a list of all available cache types:
    python
    bin/magento cache:status
  4. To clear all caches, run the following command:
    python
    bin/magento cache:clean

    This command will clear all caches, including the configuration cache, layout cache, and block cache.

  5. To flush the cache storage, which includes all caches and cache metadata, run the following command:
    python
    bin/magento cache:flush

    This command will clear all caches and cache metadata, which can help ensure that new changes or updates are reflected on the site.

  6. If you want to clear specific cache types, run the following command:
    python
    bin/magento cache:clean <cache_type>

    Replace <cache_type> with the cache type you want to clear, such as config, layout, block_html, or full_page.

  7. If you want to enable or disable specific cache types, run the following command:
    bash
    bin/magento cache:disable <cache_type>

    Replace <cache_type> with the cache type you want to enable or disable.

    bash
    bin/magento cache:enable <cache_type>

    Replace <cache_type> with the cache type you want to enable or disable.

That’s it! You have now manually cleared the cache in Magento 2.