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

samukobo's avatar

Multiple Laravel 8 projects on one hostinger host using subdirectories

Hi everyone!

I bought my first web hosting plan + domain recently! I'd like to host multiple laravel 8 websites on it, like so:

mydomaindotcom/ - would be my main portfolio site

mydomaindotcom/project - would be an entirely different site, i.e. from a different git repository

I've been following guides like these so far:

https://zestmade.com/blog/how-to-deploy-laravel-on-cpanel/

https://dev.to/pushpak1300/deploying-laravel7-app-on-shared-hosting-hostinger-31cj

My issue is that these guides require me to copy the contents of the laravel project's public directory into public_html/. Is there any way I could do something like use subdirectories under public_html so I wouldn't get conflicts from files with the same name?

public_html/
| - project1/
| - project1_public/
| - project2/
| - project2_public/

Also, is there a better way of doing this? I imagine deploying this way means I'd have to copy the contents of public every single time I pull from main.

0 likes
1 reply

Please or to participate in this conversation.