Overview
The static view files deployment command enables you to write static files to the Magento file system when the Magento software is set for production mode.
Static view files are located in the <Magento root dir>/pub/static
directory, and some are cached in the <Magento root dir>/var/view_preprocessed
directory as well.
Here is two types of mode of deploying static content.
- Developer Mode: Magento generates them on demand, but the rest are cached in a file for speed of access.
- Default or Production Mode : Static files are not generated or cached.
Deploy static view files :
Log in magneto serer as magento file system owner and remove following
- Remove
pub/static
- Remove
var/cache
- Remove
var/composer_home
- Remove
var/generation
- Remove
var/page_cache
- Remove
var/view_preprocessed
Run php bin/magento setup:static-content:deploy
You can deploy static content for specific language like en_US. By default magento takes en_US. You can use following command for other languages. For example to deploy nl_NL language
php bin/magento setup:static-content:deploy nl_NL