# Central server cakephp lib location

**URL:** <https://discourse.cakephp.org/t/central-server-cakephp-lib-location/6691>\
**Category:** Need Help\
**Created:** [September 30, 2019, 7:43pm UTC](https://discourse.cakephp.org/t/central-server-cakephp-lib-location/6691 "2019-09-30T19:43:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![phpMagpie](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@phpMagpie](https://discourse.cakephp.org/u/phpMagpie)\
**Post date:** [September 30, 2019, 7:43pm UTC](https://discourse.cakephp.org/t/central-server-cakephp-lib-location/6691/1 "2019-09-30T19:43:02Z")

</div>

Hi, eventually getting around to moving from 2.x to 3.x and first question is …

Can I install CakePHP into a central shared location on our server and reference it by changing CAKE\_CORE\_INCLUDE\_PATH in /config/paths.php like I do with 2.x?  
[https://book.cakephp.org/2.0/en/installation/advanced-installation.html](https://book.cakephp.org/2.0/en/installation/advanced-installation.html)

This works great as I just run git pull on a version of CakePHP and it updates Cake for multiple sites at once.

I’ve just used composer to install CakePHP 3.8 and not sure how nicely composer will play with this central idea as there’s a lot of extra vendor folders now.

Anyone know if I can get this working in a similar fashion?

Cheers, Paul.

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [October 1, 2019, 12:57am UTC](https://discourse.cakephp.org/t/central-server-cakephp-lib-location/6691/2 "2019-10-01T00:57:40Z")

</div>

Composer likes to put vendor files, which would include all of CakePHP, under the `/vendor` folder. You could probably put them somewhere else, but that’s going to mess with not only composer but Cake’s autoload functionality. I’ve had success running a single installation of a CakePHP application across multiple domains (with different themes and database configuration), but that setup preserves the relative location of CakePHP wrt the application implementation.

---

<div class="post-metadata">

**Author:** ![phpMagpie](https://avatars.discourse-cdn.com/v4/letter/p/d26b3c/32.png) [@phpMagpie](https://discourse.cakephp.org/u/phpMagpie)\
**Post date:** [October 1, 2019, 5:05pm UTC](https://discourse.cakephp.org/t/central-server-cakephp-lib-location/6691/3 "2019-10-01T17:05:49Z")

</div>

So it looks like I should stick with each app having it’s own copy of the /vendor folder so as not to mess with autoload etc.

It’s not the end of the world, but a shame as really handy for updating multiple projects when having a centralised copy of CakePHP (and it’s dependancies).

---

<div class="post-metadata">

**Author:** ![Zuluru](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/zuluru/32/1230_2.png) [@Zuluru](https://discourse.cakephp.org/u/Zuluru)\
**Post date:** [October 2, 2019, 3:28pm UTC](https://discourse.cakephp.org/t/central-server-cakephp-lib-location/6691/4 "2019-10-02T15:28:05Z")

</div>

On the other hand, it means that you can easily update the dependencies for just one, should the need arise.
