Magento 2 Tutorial : Create Sh File to Speed up the development

Magento 2 Tutorial : Create Sh File to Speed up the development

Hello Friends

When you are working on magento2 Development , You need to run few commands frequently like
If you are working on js , css and html file you need to run static content deployment and after that you need to give permission to var generated and pub folder and also some time you need to give permission to file for editing so it consume your time for writing command again and again

So to avoid this I am going to show you how you can speed up it.

So create a file like contentdeploy.sh and add below command in that file

rm -rf var/* generated/* pub/static/frontend/* pub/static/adminhtml/*
php bin/magento setup:static-content:deploy -f
chmod 777 -R var/ generated/ pub/static/
chown yourpcuser:yourpcuser -R app/

So whenenver you done with changes you can just run sh contentdeploy.sh file and it will do everything for you.

So now you don't have write all command one by one.


Hope This will helps you to speed your development.

If you are learner and want to learn magento you can join our youtube channel where we are teaching magento for
beginner and advance level.


https://www.youtube.com/phpacademy2020


Thanks and Keep Visiting! 😊
Leave a Reply
Your email address will not be published. *