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.
Now update PHP version from 5.6 to 7.
After uploading extract files in root directory.
Now open public folder and move all files to root directory.
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’;
Import database and change database name from config file.
Now all things are set, open browser and check your web application.
- Published Date: