I'm running on Magento 2 version 2.1.7, but everytime i change my .phtml file content i need to run php bin/magento setup:upgrade
to see the change. I already set my magento 2 to developer mode
-
This will help you: magento.stackexchange.com/a/184927/35758 – Prince Patel Jan 11 '18 at 8:19
-
magento.stackexchange.com/a/171385/42007 – steros Jan 17 '18 at 16:45
Actually php bin/magento setup:upgrade
is used when modules need to be upgraded.
For the case of change in .pthml
files, if cache is enabled you must run php bin/magento cache:clean
. This works very well for me.
You only need to run:
php bin/magento cache:flush
to see changes of phtml files.
The command php bin/magento setup:upgrade
is used to deploy new modules.
-
yes i run those scripts too, but usually my phtml file changed always show right away after i edit it without having to run any script in terminal – simple guy Jan 11 '18 at 7:56
-
I don't see how that is possible unless static content and cache was disabled or if you are reffering to Magento 1.X – Lez Jan 11 '18 at 7:59
-
No need of static content deploy . Only cache flush is more than enough – Pramod Kharade Jan 17 '18 at 16:43
For phtml only cache command is enough
php bin/magento cache:flush
No need of upgrade and static content deploy command
Use php bin/magento
, then you'll find all commands with their use
So:
setup:upgrade : Upgrades the Magento application, DB data, and schema
And you need:
php bin/magento c:f