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.

  • Yeah needs to run on each database to enable the module and update tables if required.
    – harri
    Apr 30 '18 at 16:59
  • which tables I have to update to enable my module? I am new Magento Developer. 1) app/etc/config.php (SampleModule' => 1) 2) Setup_modules (database table) 3) Make my module database table What else I have to update to enable Apr 30 '18 at 17:16

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.

  • Thanks @pallvi, As I told, I run this command, but in my project its already someone worked in pub/static folder. Its mean that pub/static files are updated one and app/code, app/designs are not updated files. Apr 30 '18 at 17:46
  • you need to tell your project manager for this issue as pub/static files are cached files and should be generated automatically. If this is not happening then there will be no development possible with standard coding. If possible create a backup folder for pub/static and then remove its content and deploy. Hope that helps! Apr 30 '18 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.