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

Ivnson's avatar

Is it possible to deploy a Laravel project to a subfolder without root acess

I need to upload a Laravel project to a subfolder. On the main Website (example.com) there already is a Website (non Laravel) and i was ordered to upload a Laravel project to example.com/new. I don't have acess to the root folder so i can't rewrite the public rule, wich I shouldn't anyway because there is a main Website. Is this doable, web.php and stuff seems to work but i somehow struggle with the routing.

0 likes
2 replies
bobbybouwmann's avatar

Well, for Laravel that is a bit harder because you always link your webroot to in the index.php file in the public directory. You're probably better off creating a new subdomain and access the application through that ;)

1 like
Ivnson's avatar

Thanks for the answer! What to do you exactly mean by linking the webroot? I Already set up a index.php in the public folder, routing it to autoload.php and app.php. wich seems to be working since I can see that in the network analysis (mozilla firefox) some of the stuff seems to be loading sucessfully and i can dd stuff in the web.php.

Please or to participate in this conversation.