Deploy Static Content Magento 2

The static view files deployment command enables you to write static files to the Magento file system .

The term “Static” means it can be cached for a site( images ,JS and CSS )

The term “View” refers to the presentation layer (from MVC).

Static view files are located in the pub/static directory, and some are cached in the var/view_preprocessed directory as well.

Static view files deployment is affected by Magento modes as follows:

Default and developer modes: Magento generates them on demand, but the rest are cached in a file for speed of access.

Production mode: Static files are not generated or cached.

You can deploy the static content by running the below command.

php bin/magento setup:static-content:deploy

Leave a Reply

Your email address will not be published. Required fields are marked *