tony starks
tony starks

Reputation: 13

Deploying Laravel projects on Hostinger

I am trying to deploy a Laravel application on Hostinger - how can I go about it? I tried using the deployment method of 000webhostapp on it because they are somehow alike but it ended up giving me

Error 500 response

I followed the procedures from this page to host it on Hostinger but it ended up giving me

Error 500

https://www.000webhost.com/forum/t/deploy-laravel-project-into-000webhost-site/127323

Upvotes: 0

Views: 3473

Answers (2)

demoxz
demoxz

Reputation: 76

I don't know if this still needed since it's an old thread, however, if anybody will reach this question you have two options:

  1. Put all folders outside public_html (one level above) and put your public/ folder's content to public_html only. Make sure the index.php path is correct.
  2. Put all folders inside public_html. Create .htaccess file in public_html (if there is no any) and paste this code to make public/ folder as a default:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

If paths are set correctly, both methods will work on Hostinger Shared and Cloud plans.

Upvotes: 3

Yamen Ashraf
Yamen Ashraf

Reputation: 2950

The guide you referenced is the most awful guide I've ever seen, follow this instead.

https://medium.com/laravel-news/the-simple-guide-to-deploy-laravel-5-application-on-shared-hosting-1a8d0aee923e

Upvotes: 0

Related Questions