Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ader79's avatar
Level 1

Laravel Forge - composer.json not found

I am trying to add an existing website to my server, with Laravel Forge. It's a CodeIgniter app and we use Composer.

Inside the repository 'deploy' is not at the top level. We have source code and assets in a folder above this.

But composer.json is inside the deploy directory

When trying to install the site we get the error: Composer could not find a composer.json file in /home/[the project]/[the site]

My project structure is

project/
    source/js/
    source/scss/
    ...
    deploy/
        composer.json
        vendor/
        public/
            index.php

Since Forge deploys from git, can I solve this by:

  • Tell it to only deploy the contents of deploy folder, and treat this as the project root?
  • Move composer.json up a level to project/ but keep everything else where it is?
  • Some other solution?
0 likes
1 reply
ader79's avatar
Level 1

Found a solution, composer.json permits the following:

  "config": {
    "vendor-dir": "deploy/vendor"
  }

Please or to participate in this conversation.