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

mattsplat's avatar

Laravel app in subdirectory of project

Is there a way to deploy on forge with the laravel app in a subdirectory? My existing projects have laravel contained in a subdirectory call src. I'd like to start using Forge without changing my folder structure and losing my git history.

0 likes
2 replies
Drfraker's avatar
Drfraker
Best Answer
Level 28

In the forge UI when you create a new site you can specify where the laravel entry index.php file will be located. It is "/public" by default but you can change that to "/path/to/src/public" and it should work fine from there.

1 like
mattsplat's avatar

Thanks. Also should be noted is I had to adjust the deployment script to use src. cd /home/forge/default/src

1 like

Please or to participate in this conversation.