Home » Magento Guide » What is Magento development? » Magento clear cache: how to clear cache in Magento

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.

ActionWhat it doesWhen to use it
cache:cleanRemoves invalidated or stale Magento cache entriesRoutine Magento changes
cache:flushClears the full cache storage backendWhen clean does not work or broader clearing is needed
Flush Magento CacheClears Magento cache entries associated with Magento tagsAdmin-based routine clearing
Flush Cache StorageClears all items in the cache storage backendUse carefully, especially with shared cache backends
Flush Catalog Images CacheClears cached catalog image filesWhen product images, resized images, or image updates are not showing correctly
Flush JavaScript/CSS CacheClears merged or cached JavaScript and CSS filesWhen 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.

  1. Log in to Magento Admin.
  2. Go to System > Tools > Cache Management.
  3. Select the cache types you want to refresh, if needed.
  4. Click Flush Magento Cache.
  5. 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.

VersionCommon cache clearing method
Magento 1Admin cache management or clearing var/cache
Magento 2Admin 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 typeWhat it affects
ConfigurationStore settings and configuration values
LayoutPage layout XML and structure
Blocks HTML outputRendered blocks and page sections
TranslationsTranslated text
Collections dataDatabase query results
EAV types and attributesEntity-attribute-value metadata
Web services configurationAPI and service configuration
Page cacheFull-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

cache:clean removes invalid or stale Magento cache entries. cache:flush clears the full cache storage backend.

Another cache layer may still be serving old content. Check Varnish, Redis, CDN, server cache, full-page cache, and browser cache.

Only disable cache temporarily during development or troubleshooting. Leaving cache disabled on production can slow down your store.

Yes, but do it carefully. Manual file deletion should be a fallback when Admin or CLI access is unavailable.

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!