Categories
Laravel

Laravel on Shared Hosting

AntJanus gave the basic approach here. It did work for my Hello World test, not sure if there are potential issues waiting, such as with maintenance or framework updates.

Basically install locally (on Composer so far), zip it all up and upload the framework directory to a private folder above public_html.

The public entry point can be directly in public_html if the site is for the domain root, or in a sub-folder. Edit both public/index.php and laravel/bootstrap/paths.php to be able to find each other.

Paths.php looked a bit like this

[29]  'public' => __DIR__.'/../public_html/laravel',
//laravel is sub-directory

2 replies on “Laravel on Shared Hosting”

Hey,
Thanks for mentioning my article! By the way, I’ve been running this setup under Laravel 3 for about a year now without any issues regarding that. And it’s been a breeze. Ever since I’ve set my app up this way, I haven’t had to go back to change/fix anything.

With that said, running Laravel on shared hosting without SSH is a pain because you won’t be able to harness the power of Artisan. So I always recommend choosing a host that either allows you SSH access from the beginning or at least lets you buy it as an add-on.

I’ve been running Laravel on a VPS so I haven’t had to face that issue; however, my website and smaller apps are on my shared host where SSH access came in very handy.

Let me know if you do encounter any issues!

Thanks for commenting Antonin. I made this site for my own reference and didn’t expect anyone to see it, for a while, or maybe at all.

Good to know those pretty simple steps to shared hosting installation have worked for you. My current host can provide SSH when there’s a need, so I’ll keep that in mind.

Leave a Reply

Your email address will not be published. Required fields are marked *