- home
- mywebsite - everything except laravel public folder
- public_html
- mywebsite - contents of laravel public folder
Laravel on shared hosting PHP version problem
Hi, this is my first time on the forum, so I hope I'm posting the question the right way.
Does anyone have a solution how to deploy Laravel application on a shared hosting. I know it's not generally recommended, but for now this is the only way to go for me. I am using a shared CPanel based hosting on hostgator. My directory structure looks something like this:
home mywebsite - folder that has everything except for laravel public folder public_html mywebsite - contents of laravel public folder
I've been struggling to upgrade the PHP version since hostgator is still stuck on v7.4. They do have an option to switch to a newer version, but that only affects the contents of the public_html directory. Since most of my files, including the artisan, are located outside of it, that change does not affect my application. I've been told by their customer service that they cannot set the php version for my home directory itself. I don't see any solution other than to put all files under public_html folder, but that would then expose my private files (.env etc). Is there anything else I could try?
Please or to participate in this conversation.