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.

In some cases you might need to regenerate those files in order for last theme changes to get applied.

In order to deploy static files you have to:

  1. Log in to the Magento server as the Magento file system owner.
  2. Delete the contents of <your Magento install dir>/pub/static using command:
    rm -R pub/static/*
  3. Run this command:
    magento setup:static-content:deploy -f

It is possible that magento command is not handled properly, in that case you should run this command instead:

php bin/magento setup:static-content:deploy

You can read more about how to regenerate Magento Static Files Cache in Magento DevDocs