When Magento 2 Style Changes Will Not Show: Clearing Static Files

When Magento 2 Style Changes Will Not Show: Clearing Static Files

Magento 2 compiles theme files into pub/static and caches preprocessed styles. If your changes do not show up, old generated files are usually the reason.

1. Remove generated files

rm -rf pub/static/frontend/* var/view_preprocessed/ var/*cache/*

2. Redeploy

php bin/magento setup:static-content:deploy

In developer mode you can often skip the deploy step, since files are generated on request. In production mode it is required.

Want this done for you? Find out more about our Magento development service.

Keep reading

Related articles

All articles

Need a hand?

Stuck on something similar?
We can fix it with you.

Send us the problem. A senior developer reads every message and replies within one working day.