First of all, I know there already are topics on using Yii Framework on shared hosting. I read those topics but I am not really convinced that I got my answer.
I read on some topics (Not sure if it was here or on Stackoverflow) that there is no way we can use Yii 2.0 Advanced application on a shared hosting environment.
Is it true? If it’s not, what settings do I need? And how do I access contents of /web folders without having /web in the address itself?
I found this :
But no matter what I did, I just couldn’t get it to work …
What i am trying to do is creating an app for a number of end users. and these users need to be able to run the app in a shared hosting environment, just like what they might do with a script like WordPress or Joomla and etc …
I will be very thankful if you provide some directions.
Tried to do what it says in "GETTING STARTED". first of all, there is no main-local.php in common/config to set the db connection in. am i suppose to create it myself?
The instruction says Apply migrations with console command yii migrate, how is a user suppose to do so in a shared hosting environment?
and at last, when i navigate to the main URL of the path on my localhost where i have installed this on, I just see a list of directories, and the site itself doesn’t actually load.
I thought of this myself but one problem that comes to mind is when doing so, you need to place everything other than web-folder above the public_html. Now, what if the user has 2 domains on their website? For example in cPanel, if the user has an addon domain on which they want to install Yii 2.0 advanced, since the folder for that domain usually (by default) resides inside the public_html, then for that addon domain, a folder above the publicly accessible folder would be inside public_html!
But when we intend to make a script available to public (like Joomla and WP) we have to consider that the average user doesn’t have such access and if they do, they don’t know how to use it.
What i need is an approach that makes this app usable for public which should not involve using shell and/or changing web root.
Forget about the advanced template (and the derivatives) - choose the basic one. It is a good starting point for 99 % of all Yii projects (including advanced projects).
If the user has several domains, simply install several basic apps, one for each domain/subdomain.
I guess you can write a script to clone and run Composer so that people don’t have to ssh into the host.
You don’t actually have to run Composer on the server at all so no shell access is required. You can run it locally and then upload results to the server.