How to deploy a Laravel project

Steps for Deployed laravel project

Lasantha Sanjeewa
3 min readJul 21, 2020

Create account & sign up

Sign Up

In the 000webhost home — Create a new web site

create site

Click the home page displayed your web site name and — Goto File Manger and Uploads Files

000webhost home page

After preview, the following page & Compress your zip and upload to root path “/ path”

File Manager

Select compresed Zip File & Upload

Zip & Upload

After Extract uploaded Zip And Delete Zip File

Extract, Upload & Delete Zip File

Delete public_html folder. After rename your laravel public folder like = public_html

public_html

After goto App/Providers/AppServiceProvider.php and add following code to register function $this->app->bind('path.public',function(){return base_path('public_html');});

AppServiceProvider..php

Open /.env. Copy APP_KEY value without base64:

.env File

Go to /config/app.php, find 'key' and replace the line with the following code: ‘key’=>env(‘APP_KEY’,base64_decode(‘%YOUR_COPIED_APPKEY%’));

app.php

Home -> database Manger -> create new databse & copy host name, Databse name,username and password

Create new DB

Paste(coppied Database details .env file)

create DB
Copy items paste to config/database.php
Restore backup SQL file

Goto 000webhost home page & goto here

000web home page

Finally, Website Deployed to 000webhost

My Web Page

My Deployed laravel project : https://simpletodoapp.000webhostapp.com/

WebSite Working

Thank You!!!

--

--

Lasantha Sanjeewa
Lasantha Sanjeewa

Written by Lasantha Sanjeewa

DevOps Engineer | AWS Community Builder

Responses (1)