Get Yii to regenerate assets under <webroot>/assets/

I’m trying to make some changes to a Yii web application developed by somebody else. I’m a “newbie” when it comes to Yii, web application frameworks and MVC in general.

For the moment, I’m just trying to make some simple CSS changes. The CSS file in question is located at:


I did some reading and it seems that Yii auto-generates this ‘b3b6f9e7’ folder, and that in fact I shouldn’t make my changes within this folder, but rather in the desktop.css file located elsewhere, which Yii would then replicate back to the ‘b3b6f9e7’ folder. Am I understanding correctly?

As a newbie, can somebody just tell me how I can get Yii to replicate my changes into this ‘b3b6f9e7’ folder? I read something about it being safe to delete the folders under <webroot>/assets/. How do I get Yii to regenerate these assets?

I’m sure as I continue updating this web application, I will be back to the forum with more questions.


Just remove all the folder under <webroot>/assets/. Yii will automatically create necessary subfolders like "b3b6f9e7" under it next time it "publishes" the assets.

Take a look at this wiki article:

And also the API doc:

Thanks for the reply.

I read the Wiki article yesterday; the API doc is over my head (for now).

What exactly does it mean to say "next time [Yii] "publishes" the assets"?

I don’t mean to be flippant, but do I just stare at my screen until Yii decides to publish the assets? ;) Or is there something I can do to prompt this to happen? If so, what is it?

Usually the asset manager is called every time the app is run.

It checks for the requested page whether the registered assets (css, js, etc) are published or not (i.e. whether it is in <webroot>/assets/<hash> or not). When they are already published it will do nothing, and if they are not, it will copy the source files there.

Thank you for the help.

So in my case, I make my edits to the file in:


then the next step is to delete the folder:

assets/b3b6f9e7 (or whatever the hash is)

and once I reload the web app in my browser, Yii recreates the just-deleted folder, using the file in which I have made my edits.

I did actually suspect that that would be how it would work, but when I was trying it out the other day, I deleted the entire assets folder, rather than just the subdirectory, and Yii didn’t recreate the assets folder, so I just wanted to clarify.