Search code examples
phpgitlaravelheroku

Procfile not found when deploying app to heroku


When deploying my laravel application to heroku i get a fail of Procfile not found. How do I create this? and what does this file need to have. I can't access the app via the browser because of the 403 forbidden error.

The exact error message when pushing files to heroku:

NOTICE: No Procfile, using 'web: vendor/bin/heroku-php-apache2'.

Solution

  • A Procfile is a file named Procfile and is a mechanism for declaring what commands are run by your application’s dynos on the Heroku platform. So you need to create a file on your public directory, name it Procfile and add the following:

    web: vendor/bin/heroku-php-apache2
    

    After this save it and upload it to your server.