Hosting Yii at 000webhost.com

Hi,

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

/htdocs/mywebapp

/htdocs/yii

On the 000webhost I have path as

/public_html/

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

Thanks,

Vic

Just Upload whole Webroot /App/

Directory inside public_html

Thanks for the reply.

Where will the yii framework folder be?

Webroot=htdocs

So in publichtml folder the structure be

publichtml/webapp?

Hi,

Upload you all code under /public_html/

/public_html/your web app file folder

/public_html/yii

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

Thanks

Its WORKING…

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 100webspace.com. 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 (https://www.cloudways.com/en/yii-hosting.php )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

C:/Xamp/htdocs/Yii2Basic

y adentro todo el directorio

C:/Xamp/htdocs/Yii2Basic/web

C:/Xamp/htdocs/Yii2Basic/controllers

C:/Xamp/htdocs/Yii2Basic/models

C:/Xamp/htdocs/Yii2Basic/views

C:/Xamp/htdocs/Yii2Basic/etc…

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

misitio/public_html/web

misitio/public_html/controller

misitio/public_html/views

misitio/public_html/etc…

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

??? ???

AYUDA

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.