4

Now i have created custom theme in magento2.Every time i wrote css it doesn't reflect immediately.I have changed mode to "developer".And also disable cache in backend.I have given the following commands to reflect my custom css.

rm -f var/* -R

rm -f pub/static -R

php bin/magento setup:static-content:deploy

chmod 0777 var -R

chmod 0777 pub/static -R

It takes too much time to do my design work.So please anyone help on this.

Devishree
  • 111
  • 4

3 Answers3

3

The solution suggested by Emizen Tech works fine and helps me out to resolve the same issue in my site.

However, it only requires mode to be set to the developer.

In order to change the mode, here is the command:

bin/magento deploy:mode:set developer
1

you can just write css/js for theme in the app/design same folder

to reflect the changes just remove that deployed file in pub/static folder

Magento2 will auto create the missing/deleted static files

Make sure that pub/static/.htaccess should be there for auto generation of Static Files. as I can See you have removed the all files and folder into pub/staic folder

copy this .htaccess file form Magento's GIT Repo. : https://github.com/magento/magento2/blob/develop/pub/static/.htaccess

Emizen Tech
  • 3,529
  • 1
  • 17
  • 33
-1

Easy way to directly change in pub/static folder and then it complete put this change in app/design folder that make it faster.

jack
  • 81
  • 6