Hosting Yii at


I have opened a free account at 000webhost.

I have no clue about how to host.

On my local server, I have file paths as



On the 000webhost I have path as


What files do I need to upload to public_html and what should be the directory structure…



Just Upload whole Webroot /App/

Directory inside public_html

Thanks for the reply.

Where will the yii framework folder be?


So in publichtml folder the structure be



Upload you all code under /public_html/

/public_html/your web app file folder


in you app index.php need change yii.php include file path.



many thanks to both Shailesh and Pravin

i have a problem with theme css it seems that in 000webhost doesnt include css files ,snyone know why?

Hi there

Sorry I’m quite new to Yii so don’t know exactly how it all hangs. I was hoping it was just a matter of dumping all Yii generated files in my hosting account and off I go but I guess its more that that

I am on a paid hosting plan with They have php installed and I have ftp access to my site.

However they said Yii is not supported.

Is having ftp enough to get Yii going? Or does it require more from your host?

Do they have to install Yii on their hosting server or something?

It’s better if you put the yii at place before the “public html” folder.

For security reasons.

Like on your root and link it at index.php in your app.

I won’t recommend free or shared server for a Yii based app, unless it is your personal project. A better alternative is an infrastructure, like DO or vultr. If you don’t know how to set it up, you can use platform, like Cloudways ( )for automating server setup process. Using this platform you don’t have to manually install OS or stack. Just select server size and datacenter location. Once server is ready, which will take few minutes, ssh to the server and install yii through composer command. Next deploy app from github or sftp. Composer and github comes pre-installed.

Hola alguien sabe como hacerlo no entendi bien las instrucciones que mencionan arriba es decir tengo mi app en mi computadora con la siguiente ruta


y adentro todo el directorio






lo subo en public_html en 000webhost hago lo siguiente

C:/Xamp/htdocs/Yii2Basic/ a public_html (lo que esta adentro de Yii2Basic)

y me queda asi





Pero solo me muestra la raiz y no me entra al index…

??? ???


YOu have to ask your hosting provider where your root folder is then place your index.php file along with the other files and folders within your root folder. This is generally the folder that auto places you within your ftp/sftp program after connection is made.