Back

How do I deploy the laravel web app to cpanel


I'm slightly new to laravel and managed to build a simple website using laravel. I tried to deploy this to the public_html folder in cpanel and made changes in .htaccess file. Regardless of the changes I made I get the following error

Forbidden

You don't have permission to access / on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Can someone help me on this ?

whatarewe replied 2 years ago

Have you checked your file permissions?

Also, are you using shared hosting? If you are: https://laravel.io/forum/03-06-2015-how-to-setup-laravel-5-in-shared-hosting

Robert Rex replied 1 year ago

Deploying the Laravel web app to the c panel is now easier. Literally, In web development realm, beginners to Laravel framework often encounter this challenge. This question is already step by step answer on Git Hub, Quora by web development enthusiasm.

  1. https://www.quora.com/What-is-the-best-way-to-deploy-Laravel-5-Project-in-shared-hosting
  2. https://github.com/petehouston/laravel-deploy-on-shared-hosting

Your Best Regards

Robert Rex

Sophia Wilson replied 1 year ago

Hi

If you have cPanel in your shared hosting you can try these easier methods before trying to move the Laravel's public folder:

  1. Often you also have an SSH access when you have cPanel on shared hostings, so you can replace the www folder (i.e. the website document root) with a symbolic link to [app]/public, then deploy your Laravel app inside the [app] folder.

  2. If you are deploying on a subdomain, e.g. [app].example.com, usually with cPanel you can choose the document root, then you can simply set it to [app]/public.

I think the two methods above are both easier and safer than moving the public folder. I would keep this as the last option.

Hope it helps you.

larafeed replied 1 year ago

I wouldn't recommend cpanel hosting for Laravel. Instead go for dedicated servers on vps or cloud. If you don't know how to setup your own server, then you can use Cloudways Laravel web hosting PaaS. You can use this platform for launching Laravel based server in one click without any need for manually installing OS or Stack.

David Boo replied 10 months ago

I agree with robert however you can also check the Basic Laravel app in 10 minutes. I would also recommend Lynda. you can take complete guide from Lynda Laravel training tutorial. if you have any issue regarding app development or any other programming area, you can solve your problem because lynda help to strong your basics.

Pardeeptech replied 10 months ago

I suggest you to try article steps : Laravel install on Cloud

You should also try Cloudways, It is a manage hosting service provider by which you can Manage and Create server on the choice of your cloud infrastructure from Google, Amazon, Linode, DigitalOcean, Vultr.

rohit replied 7 months ago

Deploy of laravel web to c panel is now not the big problem every website developer company now using the laravel framework and apply this easy way.

Elena Gilbert replied 3 months ago

Convey of laravel web to c board is currently not the enormous issue each website development company presently utilizing the laravel system and apply this simple way.

Leighton Burley replied 2 months ago

Hey, xXZang3tsuXx!

I'm a developer at Artiiseo content marketing agency, and I'd be happy to help you out. Shoot me a message, at your convenience.

Cheers!

Mishit replied 2 months ago

Hey xXZang3tsuXx,

We are team of laravel developers. Contact us for Javascript development company

Na ta replied 2 months ago

The information you share is very interesting. raze 2

Nine Hertz replied 1 month ago

I suggest you to try this I found it very informative. https://dev.to/asapabedi/deploying-laravel-5-applications-on-shared-hosting-without-the-use-of-ssh--16a6

buonzz replied 2 weeks ago

For someone reading this in 2019, I recently published a new guide with updated instructions

https://www.darwinbiler.com/how-to-properly-deploy-laravel-in-shared-hosting-2019

the good thing about the above guide is:

  • you don't need to edit anything in index.php to point to some folder
  • it support Git Workflow, on which you can easily deploy new changes to your app by issuing git pull in the server

plus - i can guarantee it works, how do I know? because that is how I deployed https://www.sheetbin.com/ in my cPanel server :-)


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us