How to upload a Laravel project on shared hosting.

msamgan

Mohammed Samgan Khan

Posted on June 23, 2019

How to upload a Laravel project on shared hosting.

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.

  1. The config cache issue
  2. 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.

  1. 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

  2. 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

💖 💪 🙅 🚩
msamgan
Mohammed Samgan Khan

Posted on June 23, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related