Blog

Magento latest News, Update, Tutorials and much more

Static files are files generated by Magento to load pages faster, so it does not need to complete all necessary computations on every page. Magento computes them once and stores them as Static Files Cache.

Sometimes applying new theme requires you to manually clear Static Files and force Magento to regenerate static files with new theme applied.

There are few ways to regenerate Static files, it's enough to run one of them successfully:

  1. Go to Magento Admin panel > System > Tools > Cache Management and click Flush Static Files Cache (This option is only availble in developer mode).
  2. Go to Magento root folder using FTP or any other remote file manager and clear the pub/static and var/view_preprocessed directories and subdirectories. Just make sure you don't delete pub/static/.htaccess file.
  3. You can clear static files using a command line, enter this command while you are in a root Magento folder:
    rm -R pub/static/*

This will remove all static files except pub/static/.htaccess file which you should not delete.

You can read more about how to Clear Static Files in Magento in Magento DevDocs.