In this tutorial i will show you how to upload laravel 5 to shared hosting. last time i was trying to upload laravel project to server but it was showing 500 error.
So here, we will see how to fix this error and finally able to upload laravel 5 to shared hosting and upload laravel project to server.
iPage has different type of control panel compared to other shared hostings. So its little bit different to upload the project to ipage shared hosting. We can do it from filezilla but it takes a lot of time to upload since laravel application is minimum of 23MB and has chunks of files in high amount.
So, its better to directly upload the archive and extract by logging it cpanel.
Lets get started :-
What we are going to do ?
- Upload Laravel Application to your iPage hosting server.
- Check PHP Version in CGI and Scripting Language Support.
- Re-check your
.env
and.htaccess
file.
Step 1 :-
To upload your laravel application to shared hosting, zip your application in archive and upload it into your hosting server via ftp through filezilla.
Login into your control panel via web browser and go to additional tools > archive gateway
. Check your uploaded files in the folder you uploaded.
Click on it and extract the files into the same web directory. Now, if you login back again from filezilla your directory should look like the image below :-
step 2 :-
Now, its time to check the php version of your server. Go to control panel of your ipage and go to CGI and scripting language support
> php scripting
. Now you have to check the php version of your server.
Laravel by default needs at least 5.6. Mine was 5.5 by default, so i had to change it to maximum which is 5.6.
After you set up your php version lets move on to step 3.
Step 3 :-
Even if you uploaded the files in zip
. The dot files that are mostly .htaccess
and others are hidden by default from ipage shared hosting. So you need to upload it via ftp to make them visible.
Laravel have 2 dot files. one of them is .htaccess
and others is .env
where you store all the connection to the database details. Even if i uploaded the files into the server the .htaccess file and .env
file are still not visible in ftp.
Re-upload those files into the server via ftp through filezilla.
Thats it, this is all you have to do to host and upload laravel 5 to shared hosting. Try visiting your website and check all your inner pages and make sure that everything is working.
By now its have been fixed If you have any problem feel free to mention them in the comments section.
Leave a Reply