Magento clear cache: how to clear cache in Magento
Key takeaways
- Magento cache helps pages load faster, but it can keep old changes visible.
- You can clear Magento cache from the Admin Panel, CLI, or file system.
- cache:clean and cache:flush do different things.
- If changes still do not appear, check CDN, server, browser, Redis, or Varnish cache.
Clearing cache in Magento can help recent changes appear on the storefront or in the admin area. But not every cache action works the same way. Magento cache, cache storage, and external cache layers can all affect what visitors see.
Host Magento at full throttle.
Get secure, reliable Magento hosting so you can scale faster.
What is Magento cache?
Magento cache stores generated data so your store doesn’t have to rebuild the same content on every request. This can help improve page speed and reduce server load.
Cache is useful, but it can also make old content appear after you update a product, category, CMS page, theme, extension, configuration setting, or layout.
When should you clear the Magento cache?
Clear your Magento cache when recent changes are not appearing or when Magento tells you cache is invalidated.
Common reasons include:
- Configuration changes
- Product or category updates
- CMS page or block updates
- Theme or layout changes
- Extension installation or updates
- Translation changes
- Static asset changes
- SSL or base URL changes
- Checkout or cart display issues
Magento cache clean vs cache flush
cache:clean and cache:flush aren’t the same. Knowing the difference helps you choose the right action.
| Action | What it does | When to use it |
| cache:clean | Removes invalidated or stale Magento cache entries | Routine Magento changes |
| cache:flush | Clears the full cache storage backend | When clean does not work or broader clearing is needed |
| Flush Magento Cache | Clears Magento cache entries associated with Magento tags | Admin-based routine clearing |
| Flush Cache Storage | Clears all items in the cache storage backend | Use carefully, especially with shared cache backends |
| Flush Catalog Images Cache | Clears cached catalog image files | When product images, resized images, or image updates are not showing correctly |
| Flush JavaScript/CSS Cache | Clears merged or cached JavaScript and CSS files | When style, layout, theme, or frontend asset changes are not appearing |
A cache ID is a unique string that identifies a specific cache record. A cache tag classifies groups of cache entries so Magento can invalidate related items together.
There are three main ways to clear Magento cache: through the Admin Panel, with CLI commands, or manually through the file system when other options are unavailable.
Method 1: Clear Magento cache from the Admin Panel
The Admin Panel is usually the easiest way for store admins to clear cache.
- Log in to Magento Admin.
- Go to System > Tools > Cache Management.
- Select the cache types you want to refresh, if needed.
- Click Flush Magento Cache.
- Use Flush Cache Storage only when you need to clear the full cache backend.
Method 2: Clear Magento cache with CLI
Developers often clear the Magento cache from the command line. Run these commands from the Magento root directory.
Clean Magento cache:

Flush cache storage:

Clear a specific cache type, such as layout cache:

CLI cache clearing is useful for deployments, development work, locked admin access, and repeatable maintenance tasks.
Method 3: Clear Magento cache manually from the file system
Manual cache clearing can help when Admin or CLI access is not available.
From the Magento root directory, you can remove cached files from common cache folders:

Use caution when deleting generated code:

Clearing generated/code is not the same as routine cache clearing. It may require recompilation or deployment steps, so use it carefully.
Magento 1 vs Magento 2 cache clearing
Magento 1 and Magento 2 both use cache to improve performance, but the tools and paths differ.
| Version | Common cache clearing method |
| Magento 1 | Admin cache management or clearing var/cache |
| Magento 2 | Admin cache management, bin/magento cache:clean, or bin/magento cache:flush |
For Magento 2, CLI commands are usually preferred when you have SSH access.
Common Magento cache types
In Magento, tags differentiate between the following Cache types:
| Cache type | What it affects |
| Configuration | Store settings and configuration values |
| Layout | Page layout XML and structure |
| Blocks HTML output | Rendered blocks and page sections |
| Translations | Translated text |
| Collections data | Database query results |
| EAV types and attributes | Entity-attribute-value metadata |
| Web services configuration | API and service configuration |
| Page cache | Full-page cache output, where supported |
You don’t always need to clear every cache type. Sometimes clearing a specific cache type is enough.
External cache layers to check
Magento cache may not be the only cache involved. If changes still do not appear, check other cache layers.
These can include:
- Varnish
- Redis
- Memcached
- CDN cache
- Server cache
- Browser cache
- Full-page cache
- Hosting control panel cache
For stores using alternative cache backends like Redis or Memcached, Flush Magento Cache may not clear all entries. Use Flush Cache Storage when a complete reset is needed.
Should you disable Magento cache?
Disabling cache can help during development or troubleshooting, but it can slow down your store. Do not leave cache disabled on a production site unless there is a specific, temporary reason.
Disable cache:

Enable cache again:

Re-enable cache after testing so your store can return to normal performance.
What to do after clearing Magento cache
After clearing cache:
- Refresh the storefront
- Test in a private browser window
- Check product, category, CMS, and cart pages
- Confirm admin cache warnings are gone
- Clear CDN, server, and browser cache if changes still don’t appear
- Reindex if product or category data still looks stale
- Check logs if errors appear after clearing cache
Troubleshooting Magento cache issues
Changes are still not showing
Check CDN, Varnish, Redis, browser cache, server cache, and whether the correct store view was updated.
CSS or JavaScript looks old
Flush JavaScript/CSS cache, redeploy static content if needed, then clear browser and CDN cache.
Product or category changes are not appearing
Clear cache, reindex, and confirm product status, visibility, inventory, and category assignment.
Cache errors appear after clearing
Check file permissions, ownership, Redis or Varnish status, and Magento logs.
The site is slow after disabling cache
Re-enable Magento cache and confirm production cache settings are active.
Magento cache FAQs
Getting started with Magento cache clearing
Magento cache helps your store load faster, but clearing it can make recent configuration, content, layout, or product changes appear correctly.
Start with Flush Magento Cache in the Admin Panel or php bin/magento cache:clean in CLI. Use broader flush actions only when needed, and check external cache layers if changes still do not appear.
Magento cache is easier to manage when your hosting environment, cache layers, file access, and support are clear. Explore Liquid Web Magento hosting for infrastructure built to help Magento stores perform with confidence.
Ready to get started?
Get the fastest, most secure Magento hosting on the market
Additional resources
What is managed WordPress hosting? →
Get details and decide if managed WordPress hosting is right for you.
Must-have web development plugins to create WordPress websites at scale →
Explore the best web development plugins to enhance functionality, improve performance, and streamline your WordPress site.
A complete guide to WordPress shortcodes →
Shortcodes make life easier. Learn how to get started!
