Whenever I click the additional cache management buttons in admin panel , it deletes the files in pub folder.

I don't know what is the reason for this.

Anyone know about this?

please help me.

1 Answer 1


Additional Cache Management System have three buttons, which are given below.

Flush Catalog Images Cache: Pregenerated product images files

Flush JavaScript/CSS Cache: Themes JavaScript and CSS files combined to one file

Flush Static Files Cache: Preprocessed view files and static files

Now if you click on the last button, it will indeed erase all of your static files. Static files are stored in pub\static\ directory.

So the answer to your question is, it erases the pub\static folder because it is what it's purpose !!!

Sorry, in case you intend anything other.

  • Please accept the answer in case it helped you or else post your own answer and then accept it later. Sep 25, 2017 at 10:26
  • and i have a doubt. the content in the pub static folder regenerted every time Sep 25, 2017 at 10:32
  • Yes, if you are in develop mode. When you click on that button, it will erase all static files. When you access any page in browser again, then if you are in development mode, it will generate static files for you. Sep 25, 2017 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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