Deploy static view files in magento 2

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.

  1. Developer Mode:  Magento generates them on demand, but the rest are cached in a file for speed of access.
  2. 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

  1. Remove pub/static
  2. Remove var/cache
  3. Remove var/composer_home
  4. Remove var/generation
  5. Remove var/page_cache
  6. 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