Home / Laravel / How to deploy Laravel Application on Shared Hosting Server

How to deploy Laravel Application on Shared Hosting Server

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.

 

About Abid

I am Abid Hussain a professional software developer, worked on dozens of projects specializing in web development. I also provide web development service on Fiverr and Freelancer.

Check Also

Prime Number in PHP

Program To Find Prime Number in PHP

A Program To Find Prime Number in PHP A Prime Number is a whole number …

Leave a Reply

Your email address will not be published. Required fields are marked *