how to change runtime and assets paths

Hi everyone,

i want to change the path of runtime and assest folders outside the project. the cause of that is that i have big problems with permissions on thoses folders on server.

is thr any way to do it ?

Of course it is… here is an example:

return array(


   'name'=>'My Web Application',

   'runtimePath'=>'<new runtime folder path>',


   // application components



 		'basePath'=>'<new assets folder path>',



Thanx so much :)


Thanks for this post. It is very useful to me. However there is something that is not working properly in my application. I have changed the path to assets folder. I can now see that new folders are publishing under the new path. That is ok. But now, gridviews, detailviews, listviews, etc., display weird. I suppose that this is due to the fact that the new .css files, scripts and images (that the assets manager publishes in the new path) are not found by the widgets. What am I doing wrong?


The assets folder must be accessible from internet, in short words it has to be a folder in the project webroot

Thanks Zaccaria, I know it has to be accessible from internet, but I don’t think that it must be a folder in the project webroot.

Anyway, it wasn’t the problem because the folder was accessible. Now I found out the problem: You need to specify not only the basePath parameter, but also the baseUrl parameter for the assetManager.

I post my code here. In my project, assets folder is located at the same level as my application folder.

'assetManager' => array(

            'basePath' => dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'assets',



Now it works!