Stratus Magento 2 Guides - Deploying static files
For performance, Magento 2 generates static files from your theme and other site components. This feature is well documented in the [Magento 2 dev docs][1], but there are some tricks to deploying and generating these files on a Webscale server.
Before deploying static files, remove any files — except the .htaccess file — in pub/static
.
The following should also be removed, especially when doing a production deployment.
- All folders under
pub/static
var/cache
var/composer_home
var/generation
var/page_cache
var/view_preprocessed
var/di
(if present)
Then the static files can be deployed using the following command (run from the bin directory in the Magento install).
php bin/magento setup:static-content:deploy
Feedback
Was this page helpful?
Glad to hear it! Have any more feedback? Please share it here.
Sorry to hear that. Have any more feedback? Please share it here.
Last modified January 1, 0001