Larvel deployment issue on shared hosting

Hello,

I understand that deploying a Laravel app on shared hosting is not recommended but tried it to experiment.

I closely followed the steps outlined here:

Many pages of the site are viewable :

https://munich-living.000webhostapp.com

However, it seems that every time a page calls the database in a controller, I get an 404 error page.

(for example, if you click on the anchor point “Accommodation seekers” in the site top menu.)

Can this be happening because the database parameters were never properly configured ? (Even though nothing in the tutorial suggests that the database needs special configuration.)

Thanks for your time.

Kâmi

Hello!

I would say yes, that’s the problem. If on your machine, the project used a database, then you will need to provide a database for it to work :slight_smile:.

Now that I’ve read the tutorial, it actually mentions that you need to change the database credentials (though for some reason he says it’s optional, where I cannot think of a Laravel project that doesn’t use a database).

Finally, you can deploy your project to Heroku, which has a free tier far better than a shared hosting. Then there are the cloud providers that offer a 12 month free trial (google cloud, amazon web services and Microsoft azure).

That’s all I have, hope it helps,

Regards!

Hi,

Thanks a lot !

KBW

1 Like