I have to make new module in magento 2 but pub/static are changed
-
08-01-2021 - |
Question
I have to make new module, I took backup from server to local and after executing commend "php bin/magento setup:upgrade" layout and function not working properly, It seem like someone worked in pub/static folder files.
Now i complete my module in localhost and need to upload at server, Did any way to upload module and run without "php bin/magento setup:upgrade" commend ?
My module also have database table.
Can you please advise me the best way.
Solution
With Magento2, It is best way to run "php bin/magento setup:upgrade"
command followed by below commands,
rm -rf pub/static/_requirejs pub/static/adminhtml pub/static/frontend
php bin/magento setup:static-content:deploy
rm -rf var/cache var/page_cache var/generation
chmod -R 777 pub/static/ var/
In you local you can set
php bin/magento deploy:mode:set developer
If still issues persist, share your log.
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange