0

I am customizing a Magento 2 theme, I am a little bit confused that after changing anything in coding or changes in CSS I have to run some command as suggested

For this each time I have to ask system administrator to run the command as I have no access to shell

like php bin/magento setup:static-content:deploy command

Is there any other way to do the same.

2

When you are working with M2 you must need to deal with commands.

You will need to ask your system administrator to create one user group with some restrictions so you can use that group to run commands and it can not be used as root user.

Another way use php shell_exec function to run your commands. You can create one script on root and run your command with shell_exec. You can run your file in browser.

For more details check here

0

You can put your css and js in pub/static/frontend/Magento/Your_Theme/en_US/css and pub/static/frontend/Magento/Your_Theme/en_US/js. This way you won't need to run setup:static-content:deploy command on every changes you make in css or js. But remember one thing that whenever someone runs a setup:upgrade command, you will lost your css and js from pub directory. For this, you have to copy all css, js, images and fonts from pub folder to your theme's web folder

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.