Deploy Laravel application on Heroku

Recently I have tried that how to deploy mLaravel 5 application on Heroku, which is one of the most popular Cloud Platfom nowadays, and I really love to use it. There are a lot of guidelines out there but I have faced some problems and I would like to share it thus anyone can put their laravel project on the cloud without any troubles.


  • Prepare Laravel project
  • Create Heroku user account here.

Deploying to Heroku

1. Login to Heroku
First you need to login to Heroku via command line: 
$ heroku login
Enter your Heroku credentials:
Password: ******
Logged in as

2. Heroku create
Use the Heroku Toolbelt to initialize a new Heroku project:
$ heroku create
Creating quiet-falls-84273... done, stack is cedar-14 |
Git remote heroku added

3. Creating a Procfile
$ echo web: vendor/bin/heroku-php-apache2 public > Procfile
4. Setting Laravel encrytion key
$ heroku config:set APP_KEY=$(php artisan --no-ansi key:generate --show)

5. Pushing to Heroku
Now the neccessary setting is almost enough, you need to push project to heroku by following commands: 
$ git add .
$ git commit -m "deploy to hereku"
$ git push heroku master

6. Open your site
After you successfully deploy, you can open on browser or type
 $ heroku open


Thank you!

If you liked this article

Let's subscribe the updates of Scuti!
Share on Google Plus

About Quang Hoan

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment