How to deploy Laravel Application on Shared Hosting Server

How to deploy Laravel Application on Shared Hosting Server

April 5, 2018 0 By Abid

You may have created your first laravel web application and you are not sure how to deploy laravel applications on your hosting server. In this tutorial, I will show you how to deploy laravel 6 application in your hosting server. I will deploy on hostgator.  Follow the given simple steps:

Open your Cpanel

I am using hostgator so I have opened hostgator cpanel. You can open your hosting server. Click Selector.

 


Step 2

Now update PHP version from 5.6 to 7.

 


Step 3
Step 4


Step 5

After uploading extract files in root directory.

Step 6

Now open public folder and move all files to root directory.


Step 7

Now open index.php and edit following codes:

require __DIR__.’/../vendor/autoload.php’; to require __DIR__.’/vendor/autoload.php’;

$app = require_once __DIR__.’/../bootstrap/app.php’; to $app = require_once __DIR__.’/bootstrap/app.php’;

Step 8

Import database and change database name from config file.

Step

Now all things are set, open browser and check your web application.