0

Please I did not understand this in documentation.

Running this command with the -f argument can fix issues regarding deployment of static content, but removes all symlinks and deploys the actual static content files.

It means about bin/magento setup:static-content:deploy command

What does it means?

Thanks in advance

asked May 20, 2020 at 11:22

1 Answer 1

4

Static Content Deploy command (bin/magento setup:static-content:deploy) can be run only in production mode.

The purpose of this command is to generate static content that will be store in the pub/static directory.

In developer mode, there is no need to run the static content deploy command as the static files are symlinked on the fly.

But for any reason, if you want to run this command in developer mode, then use -f to tell the system that you want to run static content deploy forcefully.

NOTE:

  • Deploying these files in developer mode (using -f) can enable you to debug these files. As your debug sessions are usually on a local installation (VS Code for example), for instance pushing to Github/BitBucket from your server.
    Sometimes if you don't have the deployed versions you can't debug effectively.

  • Setting the environment in production mode is an alternative to consider: this approach is more immediate to resolve a static file issue as it replicates the real condition where the problem was identified initially.

answered May 20, 2020 at 11:38

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.