When I was looking to deploy a Laravel project on Hostinger shared hosting, I found that there was no proper guide available on the internet. So I decided to write a step-by-step guide on how to host a Laravel project on Hostinger shared hosting. I hope this will help someone who is looking to host a Laravel project on Hostinger shared hosting.
As Hostinger's shared hosting does not provide the same functionalities as a VPS or Dedicated Server, so there are some limitations. However, I have tried to overcome those limitations and make the Laravel project work on Hostinger shared hosting.
- Added a workaround for hosting a subdomain from the same Laravel install — see "Hosting a subdomain from the same app" near the end.
- Added a fix for accounts where the SSH
php/composerPATH points at an older PHP version than the one actually configured for the site — see "Wrong PHP version on the SSH PATH" near the end.