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

Lugi's avatar
Level 21

Laravel on shared hosting with other sites

Is it possible to setup Laravel on shared hosting but not to break other active sites ? I have main site and add-on domain and also parked domain and this should stay active. Now I wonder if I could setup Laravel in a subfolder not to break anything else ?

Since this is my first post here, I have to say that I'm very satisfied with the laracasts videos - it's definitely the best learning material I have seen.

0 likes
5 replies
Penderis's avatar

Yes what is the goal of the separate laravel install? because a sub domain works as a sub folder and would allow you to run laravel as a complete separate site.

monsterdream's avatar

If you have ssh access it will be possible, but I think it's rare for shared hosting. If you don't have access to SSH then you will very fast realize that it's no worth it to install your laravel instance there :) I had this same situation, when I learn more and more, at the end I finish with DigitalOcean + Forge and leave my shared hosting with more then 100 projects.

Lugi's avatar
Level 21

I have SSH. I eventually had installed Laravel once before to that same shared hosting and it worked fine. But I installed it outside public_html folder (because of security) and then added some code to .htaccess and everything worked fine. And then I needed to have this regular site active and I restored .htaccess to default so it loads the content from public_html. Now I'm interested how to have Laravel installation with coegsistance with this main active site in public_html. I don't have specific goal that it has to be outside public_html or in subfolder or anywhere - I'm looking for all options and advices here (looking for best practice). For now, this site will be for testing so the URL doesn't matter - the only request is that laravel installation doesn't break main active (static) site under public_html. Please, add anything you think it could help me - link to other articles, discussions. Thanks in advance.

Lugi's avatar
Lugi
OP
Best Answer
Level 21

Ok, I'll try to find out by myself..

Please or to participate in this conversation.