it's different from share hosting deployment
btw you can follow these two articles
https://laravelarticle.com/deploy-laravel-on-shared-hosting
that can help you deploy on shared hosting
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi, I'm currently try to run a really small Laravel app on a shared hosting (Apache +nginx, but configured as apache). It's a good shared though, I can use shell and can access root. So, I currently have
/laravel (I uploaded the main app files here)
/laravel.example.com (the app will be served from here, and here I placed laravel's public folder contents)
By following a tut, I was looking at bootstrap/paths.php to change the public path on a 'public' property. But guess what? On Laravel 8 there's no bootstrap/paths.php file :)
So what? How to run a Laravel app on a shared host keeping the core app on the root (for security reasons)?
So I was able to setup my remote shared host env by partially follow the guides above but remaining in my original directory setup. Anyway, basically, the main thing one has to do, is just modify some directory paths in php files... So, how I did:
/laravel (I uploaded the main app files here) <<< please note that you can name it whatever you want
/laravel.example.com (the app will be served from here, and here I placed laravel's public folder contents, including original .htaccess) <<< please note that laravel.example.com is fake: put just any domain you want
Then:
Obviously, update db connection parameter and upload db content
on /laravel/server.php > change the following paths:
__DIR__.'/public'.$uri
__DIR__.'/public/index.php
To these:
__DIR__.'/../laravel.example.com'.$uri
__DIR__.'/../laravel.example.com/index.php'
__DIR__.'/../storage/framework/maintenance.php'
__DIR__.'/../vendor/autoload.php'
__DIR__.'/../bootstrap/app.php'
To these:
__DIR__.'/../laravel/storage/framework/maintenance.php'
__DIR__.'/../laravel/vendor/autoload.php'
__DIR__.'/../laravel/bootstrap/app.php'
Done. All it's working fine for now.
Please or to participate in this conversation.