# Theme files gone after extension installed

I am really not familiar with Magento 2 - a colleague has built one mainly using a pre-purchased theme but I haven't been involved until today.

This morning I manually installed an extension which seemed to be just a matter of uploading a folder and its contents into the public_html/app folder.

Then used PuTTY to enable, update, compile, clean the cache. The dashboard seems fine and the extension was installed fine.

However on the front end, a whole pile of files in public_html/pub/static have disappeared and the site is broken. Any idea how this could have happened? Was it during the update/compile? I believe we have a backup but just wondering for future reference...

## 3 Answers

After compile you need to deploy static files again. Use command

php bin/magento setup:static-content:deploy

• Thanks - I just found this out after I posted . Have run that and need to run it again with en_GB after it as all I got was a load of en_US stuff, but on the right track now, thanks! – hawthorn Nov 28 '17 at 13:29

Run this command from command line :

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy

• You mean that he should roll his face over keyboard? – Bartosz Herba Nov 28 '17 at 13:23
• after compilation, you need to generate file again, so it is better to run those command from command line. – Dhiren Vasoya Nov 28 '17 at 13:26
• Do you mind to elaborate the connection between changing theme and setup:upgrade, indexer:reindex command plus why he should run both cache:clean and cache:flush? – Bartosz Herba Nov 28 '17 at 13:30
• That command just to clear cache, because magento many time create issue dua to that. – Dhiren Vasoya Nov 28 '17 at 13:31
• How does it answer my question? I mean, your answer looks little bit like "hey dude, i do not really know what i am doing but try to run all commands and cross your fingers". But I might miss some connections between processes that is why I am asking for details. – Bartosz Herba Nov 28 '17 at 13:33
php bin/magento module:enable EXTENSION_NAME
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:clear  clean


That is what I had ^^. Just ran

php bin/magento  setup:static-content:deploy en_GB


and am back in business. Thanks for the help.