0
votes

I am trying to deploy a Laravel project on shared hosting. I copied the Laravel folder in user's root directory (/home/shrpr) and copied the content of public directory in /home/shrpr/www folder. I modified the index.php in public folder to include "../Laravel" as explained in site. Since, composer is not allowed on this shared hosting, I also copied my local vendor and storage folder along with laravel folder. But I still keep on getting error 500. So, I added a test.php file in the laravel folder and included it in index.php file to test if path and all is correct as under:

require __DIR__.'/../laravel/test.php'; die;

This works fine as the content of test.php is getting displayed properly. So, it looks like some dependencies of vendor folder is missing. Is there a way of identifying and uploading complete dependencies of laravel and uploading it, that is without use of composer?

3

3 Answers

0
votes
  1. Try composer update before upload to shared hosting.
  2. Change permissons of your index.php to 644.
  3. Check your enviroment, maybe isn't works.
  4. Wich version of php is running in your shared hosting? and wich is yor Laravel version, change php version to 7.0
0
votes

Make sure you have PHP 5.5+ installed on the server. Move the index.php file from public to www and change the paths accordingly.

0
votes

Another way to deploy laravel on shared hosting is to set up your domain as addon domain and then set root folder of the addon domain to the /public folder of the laravel project. eg. home/mili/laravelproject/public

I tried this with godaddy and it worked.