Reputation: 405
I have a shared hosting server set up with multiple Yii 1.1 applications running at the same time. What I have done is moved the common yii 1.1 framework folder one above the web root and modified the index.php in all the Yii applications to grab the framework files from that folder.
But with Yii 2.0 I'm not able to do that. I moved the vendor folder outside the application and then modified the index.php file to point to the new location, but there are further dependencies which are failing.
Has anyone set up their application this way?
E.g.
public_html or web or www
vendors
Upvotes: 0
Views: 1073
Reputation: 3893
In your config file you can specify a vendorPath to point to your new vendor location, so
$config = [
'vendorPath' => 'relative/path/to/your/vendors/folder',
'components' => [...]
// ... other configurations
]
You will also need to modify your composer.json to point to the new location, if you intend to update components using composer. There is a fuller description here.
Upvotes: 2