Why does my css keep breaking and none of the clicks works in Magento2 frequently, even without any changes done in any of xml files.

Everytime I need to run php bin/magento setup:static-content:deploy, it is very frustrating.

What can I do about it?

closed as unclear what you're asking by Rakesh Jesadiya, Keyul Shah, Amit Bera, Qaisar Satti, Marius Sep 6 '16 at 8:10

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • You might be using the incorrect Magento mode then. Can you claridy what does "even without any changes done for any of xml files." means? – mbalparda Sep 4 '16 at 14:01

Some important things to consider:

  • you should work in developer mode
  • when in developer mode, do not run static setup:static-content:deploy, it will copy the files so that on the fly generation of symlinks does not work anymore.

    To make it work again, delete pub/static/frontend and pub/static/adminhtml. Do not delete the whole pub/static directory, because the .htaccess file is important for the developer mode to work.

    See also: Which compilation commands are needed in developer mode and when?

  • The webserver user must have permissions to create symlinks in pub/static. This is especially problematic if it runs on Windows.


I had the same issue, try putting the magento into development mode.

bin/magento deploy:mode:set developer

I also found that i needed to make sure i set the correct permissions on files to allow read write.

Also make sure you flush the cache.

 cache:clean                               Cleans cache type(s)
 cache:disable                             Disables cache type(s)
 cache:enable                              Enables cache type(s)
 cache:flush                               Flushes cache storage used by cache type(s)

Hope this helps.

  • Permissions are already set and im already in Dev mode – Sushivam Sep 4 '16 at 14:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.