Magento 2 Setup: Upgrade to Update Modules Breaks Layout

magento2

Many guides I read state just running setup:upgrade or clearing the cache will result in changes to modules being made apparent, but if I just clear the cache it doesn't help, even if I delete all the files in the var/generation and var/page_cache and var/di and var/cache folders and run magento cache:clean. Running magento setup:upgrade break the site, no js or css is there at all unless I rerun setup:di:compile and setup:static-content:deploy yet the site is in development mode with caching disabled, so why do I have to re compile and re deploy for every change to a module? It seems broken 🙁 Especially as all these guides say just setup:upgrade or cache:clean should show my changes, which I'm not understanding why need run if I'm in development mode with cache disabled? Any help greatly appreciated, waiting to redeploy for any change I want to see is very time consuming.

Best Answer

setup:upgrade : If you enabled one or more modules, then you will need to run magento setup:upgrade to update the database schema.

Setup:upgrade : it not require run on every changes in module.

cache:clean : if it enable from admin then you have to clean after any changes in code, but if it disable from admin then no need to run cache:clean command.

When we run setup:upgrade command after that we have to deploy static content, else no need to deploy static content.

Related Topic