Are you looking to clear Magento 2 Cache?
Your web browser, hosting server, and caching extensions can all serve cached content, making it difficult for the users and visitors to see the changes you made to your store right away.
When you are stuck on any web page, clearing your Magento cache is also the first troubleshooting advice you’ll often hear.
This article will show you how to clear the cache in Magento 2 properly.
What is Caching in Magento?
Caching solutions make a copy of static versions of your website. This allows Magento to skip running heavier PHP scripts every time your site loads.
The caching process helps to improve Magento’s speed and performance and the overall user experience.
How caching works in Magento 2?
There are various types of caching solutions available for Magento.
First of all, caching is prebuilt in Magento 2. You have to enable it, and the platform will start creating the cache.
A large store that has extensive caching requirements can use a Magento extension. One popular Magento caching extension is Full Page Cache Warmer for Magento 2 by Mirasvit.
These Magento extensions provide the functions to control the files and media that is needed to be cached. They help to schedule clearing the cache and more.
Depending on your hosting provider, you might already have Magento caching built-in. For example, the Breeze Magento hosting platform comes with a caching option – that you can enable/disable with a click.
Web application firewalls including Sucuri and Cloudflare also come with caching for better website security and uptime. If they are implemented on your store, you can enable/disable their caching from their dashboard.
Finally, all the modern web browsers will also store cached versions of pages on your web browser — known as browser cache.
Why Clear Your Magento Store Cache?
Sometimes the store does not updated the page and keep showing the cache version of content. Instead of loading the new version of your site, the users will be stuck loading an old version.
Not clearing the Magento 2 cache will prevent both you and your visitors from seeing any updates you’ve made to the Magento theme design.
Clearing your Magento cache ensures the most recent version of your store will always be live.
Clear Magento Cache
Let’s see how to clear Magento 2 cache with with these 3 methods:
- Clear Magento Cache from Magento Admin Panel
- Flush Magento 2 Cache via Command Line
- Clear Magento 2 Cache from Breeze platform
#1 Clear Magento 2 Cache from Magento Admin Panel
Follow the steps to clear Magento 2 cache from the admin panel:
- Log in to the Magento store
- Go to System
- Access Cache Management
- Press the orange Flush Magento Cache button
- Scroll down to find more Cache Management
You should also clear this cache according to the changes you made.
#2 How to flush Magento 2 cache via Command Line?
You can also use CLI to flush Magento cache. Go to the Magento root directory to run the following commands.
Flush Cache Storage:
php bin/magento cache:clean
A short command line:
php bin/magento c:c
Flush Magento cache:
php bin/magento cache:flush
A short command line:
php bin/magento c:f
You can do more with the command lines. Find the common command line code for quick Magento work.
#3 How to flush Magento 2 cache from Breeze?
If you are using the Breeze platform to manage and run your Magento store, you can clear the Magento 2 cache from the platform itself.
Follow the steps:
- Follow the steps to clear all website cache.
- Login to your Breeze platform
- Select the Company you like to work on
- Click on the ‘Sites’ to open the site list
- Open the ‘Website’ to clear the cache
- Open the Overview section
- Find the Purge All Cache under Quick Tools
As you can see, you can clear Magento 2 cache easily, whichever process you follow. If you make regular changes to the website, you have to clear the cache regularly.
Got doubts? Or encountered an error while clearing the Magento 2 cache.
Please leave them in the comments.