Host Laravel Project On Hostinger Shared Hosting
Published 11 October 2023 by Jarvis Silva
Looking to deploy laravel project on Hostinger but don't know how then this is the tutorial for you, In this article I will show you how to host laravel project on Hostinger shared hosting plan so read till the end.
Laravel is a popular PHP framework which is widely used for creating full stack websites. Hostinger provides one of the best web hosting at affordable price. So choosing to host your laravel project on Hostinger is a great choice.
To follow through this you need to have a laravel project ready for deployment and a Hostinger account with domain connected, for hosting this laravel project we will use Hostinger's premium shared hosting plan it will run our website very smoothly.
Read: Connect domain to Hostinger
If you don't have Hostinger web hosting here is a Hostinger Special 70% Discount Link for you use it to get web hosting for most cheap price. so now let's see how to host our laravel project.
1. Upload Code Files To Hostinger File Manager
- Login to your Hostinger account and go to the hpanel of your website.
- Click the file manager link in your hpanel, it will show you button to access your file manager of your site click on it.
- It will open you file manager, you should see a public_html folder like below
- Open the public_html folder now inside this folder all your laravel code will come, so now we need upload the code here.
- To upload first zip your entire laravel project folder and drag and drop inside public_html folder and extract the zip folder here, now all your laravel files should display here looking like below.
![Hostinger Panel](/_next/image?url=%2Fhostinger-panel.png&w=3840&q=75)
![Hostinger file manager tab](/_next/image?url=%2Fhostinger-file-manager-tab.png&w=3840&q=75)
![Hostinger file manager](/_next/image?url=%2Fhostinger-file-manager.png&w=3840&q=75)
![Hostinger laravel files in file manager](/_next/image?url=%2Fhostinger-laravel-files-in-file-manager.png&w=3840&q=75)
Now if you visit your site at your domain you should see your laravel website live or if you have used mysql database then you will get a database error so let's see how to configure database in Hostinger.
2. Connect Database To Laravel Website
- First we need to create a mysql database so go back to your hpanel and go to databases page.
- Enter the database name, your username and a db password and hit create, now it will create a new database for you.
- Now add the new database details in your laravel .env file, you can even click on enter phpmyadmin and manage your database there.
![Hostinger databases section](/_next/image?url=%2Fhostinger-databases-section.png&w=3840&q=75)
Summary
So this was everything required for successfully deploying a laravel website on Hostinger, I hope you were able to deploy your website successfully if you faced any errors contact Hostinger customer support they will be there to solve your queries.
Also Read: Host react app on Hostinger
I hope you found this article useful and helpful, do share it with someone who might need it. Thank you for reading, Have a nice day 😊
About the author
I am Jarvis Silva, a tech enthusiast. I have 5 years of experience in website hosting and development, Now sharing all my knowledge related to web hosting and other various tech on the internet through Hostwizly.