How to upload a Laravel project on shared hosting.
Mohammed Samgan Khan
Posted on June 23, 2019
I can understand if you are searching for this article, you are in a desperate need and a VPS is not an option available to you. I'll not lecture you on how VPS is a good option but if you have that, go for it.
uploading the files is simple, all you have to do is make .zip and upload, the tricky part are as follow.
- The config cache issue
- The public directory issue.
I tell you how to resolve these two issues one by one.
Config Cache Issue
There are two possible ways to resolve this issue.
The first one is to use the artisan commands through URL, yes you heard it right. We can use all the artisan commands through URL. Here is the link for more details. Click here for more details
you can do the work which the command will do manually. i.e. you have to delete the old cache. ones the old cache is deleted, in next run new cache for config will be auto-generated.
To do that all you have to do is
root directory -> bootstrap directory -> cache
and delete all the files and we are good to go.
Public directory issue
to resolve this issue all you have to do is add a .htaccess file to your root directory with some rules. You can find the complete details here
hope this was of any help to you. In case you have any queries you are welcome to ask in the comment section.
happy coding.
samgan
Posted on June 23, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.