When working in Magento production mode static files can be written to the file system with the static view files deployment command. After your content is deployed and you need to install a new module it won’t work without the command, as long as the extension runs the already-existing (generated) and cached files. Therefore, you should deploy the new files for they get to the static content and become usable by the Magento new module.
The ‘static view files’ are assets cached for a site from MVC, e.g.: images, CSS, fonts, JavaScript used by a theme.
The files are also placed in the <your Magento install dir>/pub/static directory, and some are cached in the <your Magento install dir>/var/view_preprocessed directory.
Static view files deployment depends on Magento 2 modes:
When installing a new extension in the developer mode it can load new static files, such as JavaScript, CSS, layouts, images, etc. To avoid issues coming from the files stacking, you need to delete the previous ones to make the new module run smoothly.
You can manage the process in several ways:
Step 1: Log in to the server, as the Magento file system owner:
Step 2: Remove the <your Magento install dir>/pub/static content (see Clear static files in Magento 2).
Step 3: Use the next Magento 2 deployment tool for static files: <your Magento install dir>/bin/magento setup:static-content:deploy.
This command rebuilds the mapping to project files.
Step 4: You can enter the Magetno 2 command options to see all the parameters (the step is optional): magento setup:static-content:deploy [<list of languages>] [-t|--theme[="<theme>"]] [--exclude-theme[="<theme>"]] [-l|--language[="<language>"]] [--exclude-language[="<language>"]] [-a|--area[="<area>"]] [--exclude-area[="<area>"]] [-j|--jobs[="<number>"]] [--no-javascript] [--no-css] [--no-less] [--no-images] [--no-fonts] [--no-html] [--no-misc] [--no-html-minify] [-d|--dry-run].
The command parameters and values are the following:
To ensure fast website performance, keep your cache warming scheduled and automated with Full Page Cache Warmer for M2.
See also: How to create a static CMS page in Magento 2.
Login and Registration Form