Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.38 KB

clean_static_cache.md

File metadata and controls

30 lines (21 loc) · 1.38 KB
layout group subgroup title menu_title menu_node menu_order version github_link
default
howdoi
clear-static-files
Clean static files cache
Clean static files cache
parent
1
2.0
howdoi/clean_static_cache.md

You can clean generated static view files in any of the following ways:

  • In the {% glossarytooltip 18b930cf-09cc-47c9-a5e5-905f86c43f81 %}Magento Admin{% endglossarytooltip %}. Go to System > Tools > Cache Management and click Flush {% glossarytooltip 363662cb-73f1-4347-a15e-2d2adabeb0c2 %}Static Files{% endglossarytooltip %} Cache.

  • Manually by clearing the pub/static and var/view_preprocessed directories and subdirectories except for pub/static/.htaccess.

  • Using the Magento command line.

    • To clear the pub/static directory of all files except .htaccess (which is a hidden file), enter the following command:

    rm -R pub/static/*

    • Several commands support an optional parameter --clear-static-content, which cleans generated static view files:

      • [magento module:enable and magento module:disable]({{ page.baseurl }}install-gde/install/cli/install-cli-subcommands-enable.html)
      • [magento theme:uninstall]({{ page.baseurl }}install-gde/install/cli/install-cli-theme-uninstall.html)
      • [magento module:uninstall]({{ page.baseurl }}install-gde/install/cli/install-cli-uninstall-mods.html)