skip to Main Content

I have Magento 2.
I edit a module and then i try run this command code:

php -dmemory_limit=5G -f bin/magento setup:upgrade 

But i after done that site and back-end theme disappear so i have to run this command always:

php -dmemory_limit=5G -f bin/magento setup:static-content:deploy -f

Is it possible to prevent the site from falling down after upgrading a module?

2

Answers


  1. Switch to developer mode in your local repo

    bin/magento deploy:mode:set developer

    Login or Signup to reply.
  2. This is how it’s meant to work (production mode).

    The module you enable is likely to contain it’s own templates, layouts, static content etc.
    The second command is how magento gathers the static content from all modules so they are actually usable on the front-end website.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search