I developed an application with laravel 4.2.8 and now I am having trouble deploying it. I followed this answer https://stackoverflow.com/a/16683938/3153380 but its not working. I am getting a white screen and the headers are returning a 500 Internal Server Error status.
I read around that laravel 4.2 is a bit tricky to set up on shared hosting is this true? I can seem to find a working solution so those that have deployed 4.2 before please help. My folder structure is like below
root/ laravel_base/ app/ ... public_html/ siteroot/ assets/ packages/ uploads/ index.php ... Any pointers?
Q: How to deploy Laravel on shared hostingDo ZIP your Laravel project. Create a database in your cPanel. Import the local exported database into shared hosting database. Upload project ZIP file to public_html folder and extract.
First make sure that your shared host runs php
>= v5.4. Second try to follow this steps:
public_html/
or www/
. Ex: project/
project/
folderpublic/
folder into your public_html/
or www/
(the .htaccess must be there too)
Inside public/ locate the index.php file and change the following paths:
a. Path to autoload.php
require __DIR__.'/../bootstrap/autoload.php';
into
require __DIR__.'/../project/bootstrap/autoload.php';
b. Path to start.php
$app = require_once __DIR__.'/../bootstrap/start.php';
into
$app = require_once __DIR__.'/../project/bootstrap/start.php';`
After all that it should be working.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With