Problems activating your account? Send notification email to: [email protected]
Host4Fun Budget VPS Hosting
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Deploy git to vercel.
I am working on a project on a Blood Donation Diary app. After completing the project I needed to deploy my project to see its behaviour in the live environment. I have limited free option. Here I am sharing how I managed to deploy to vercel with MySQL database support. Vercel is a pass provider. You can deploy non-commercial projects for free here with up to 100GB bandwidth and no storage.

To start you need the following things-

1 . Git account 
 1.a. How to add the remote repo to a local dev environment
2. Vercel Account
3. Remote enabled MySQL database access.

Here I am demonstrating how to make work with the laravel app.

Create a laravel app using composer

composer create-project laravel/laravel laravelapp

Make Updates to or customise to it.

create these files in your root directory

Create this file

Please note there is a dot file.

Now add these codes to their files


PHP Code: (Select All)

// Forward Vercel requests to normal index.php
require __DIR__ '/../public/index.php'


PHP Code: (Select All)

PHP Code: (Select All)
   "functions": {
       "api/index.php": { "runtime""[email protected]}
   "routes": [{
   "env": {



Note: you can get all kind of info on the supported framework using this vercel PHP here

Now create and push to your git. (I am assuming you know how to do that. Google if you can't.)

Now you need to create a project into vercel and add a GitHub account with vercel.

Now add GitHub repository to your project here

project > settings > git > Connected Git Repository

Now with every push, your site will auto-deploy.

Now you need to add apps environment variables

project > settings > git > Environment Variables

From your command line inside the local dev app run
php artisan key:generate --show

This will create a key,(and display) for your app and add these lines as env in vercel

APP_KEY = *****

You can add your MySQL details here or just hardcoded to the app, I have found env not so reliable. So I have to hard code it. Please note hard coding to GitHub repo is not recommended and it is exposed. you can do that inside your config/database.php file.


Replace ** with their values.

You have to migrate your MySQL database ahead of time because vercel does not provide a terminal. 

So here is how I did use vercel to check on my development in a production environment.

I am using vercel for 2 days now. I will update as I learn more.

Have you used this tutorial to get a free hosted website for yourself? please share. I will update with another free PostgreSQL service.
So I made an article on medium and it's free to read. So please give it a try if you going to deploy your app on live or production and check how they run. It's more advance than this tutorial.

Forum Jump:

Users browsing this thread: 1 Guest(s)

Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting

About Post4VPS

Post4VPS is a forum/destiny where you can Delploy Your Free VPSs just by the Power of Posts.

We Provide VPSs of many locations like Germany,US,Canada,France,London,etc.

We also Provide VPSs of Both Linux and Windows OS.