1

Is it possible to reflect CSS/JS/XML/Catalog changes on storefront without deleting below folders and running CLI commands

pub/static/frontend
var/view_preprocessed
php bin/magento indexer:reindex
php bin/magento cache:flush

We are doing minor CSS changes and in order to reflect our changes on frontend, every time we have to delete above folders and clear cache. For Catalog changes we also have to reindex data.

A developer may know the process to delete folders and flush cache and also how to run CLI commands. But assuming a use case where admin is making changes or a designer is working on CSS files, how could they see their changes without going through deletion process.

How could I perform and push my changes to storefront without deleting folders and running CLI commands considering a use case where a designer is given access to magento store theme path only.

  • Did you use grunt which provided by default for developing purpose? – Khoa TruongDinh Mar 16 '18 at 9:11
  • No. could you please guide on that. Actually we are on staging server where multiple resources work together but few designers do not know Magento process to delete all folders and cache. – Slimshadddyyy Mar 16 '18 at 9:19
  • what about cache refresh ! – Verdu Mar 16 '18 at 10:22
2

If you need to reflect CSS/HTML/JS changes, please use Grunt. I recommend to follow the below link:

Magento 2 - How to configure Grunt in PhpStorm

These Grunt commands will run smoothly and you will see the effects almost instantly.

If you need to reflect the changes made in XML/PHTML in the Catalog areas you shouldn't delete any folder, just run in your console:

php bin/magento cache:flush layout block_html full_page translate

  • Thanks for responding. We can use grunt as task runner but I have a use case where a designer is given access to magento store theme path only. When the changes are performed, it do not reflect as it required cache cleaning and folder deletion. How could I overcome this situation? – Slimshadddyyy Mar 16 '18 at 10:43
0

Go to System->Cache Management and scroll down to Additional Cache Management , there you will find a button "Flush static files cache". this will function like you command ran "setup:static-content:deploy".

if you make any changes in less file it will recompile and reflect the changes.

  • The point I am making is to avoid deleting any folder either manually or from admin. – Slimshadddyyy Mar 16 '18 at 9:27
  • this is the only option to reflect changes, without giving server access. in that way you only give limited admin access to designer to make changes and see how is it going. – Naveed Asim Mar 16 '18 at 9:31
  • What if the store is in production mode? Can the changes done in production mode gets reflected without deleting anything? – Slimshadddyyy Mar 16 '18 at 9:48

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.