You should now see the sample PHP project. Now that all is set, you're ready to go on and run Grav instead of the sample site.

First, delete the web/ folder in your current site folder.

Copy your Grav site files there, making sure you're also copying the .htaccess hidden file. Overwrite all the files that were existing.

Now open the Procfile file. This is a Heroku-specific file. Change the line to

web: vendor/bin/heroku-php-apache2 ./

You should make sure the site works locally, prior to uploading it to Heroku, just to ensure the are no errors.

Now commit to the repository with

git add . ; git commit -am 'Added Grav'

Then edit composer.json and add post deploy command to the scripts section as in

"scripts": {
"compile": [
"bin/grav install"
]
}

and commit that to the repository with

git add . ; git commit -am 'Add post deploy bin/grav install'

Then run

git push heroku master

and the site should be good to go!

Due to the ephemeral nature of Heroku's filesystem, all needed plugins or themes must be added to composer.json just like above and kept there so they are installed every time the site is pushed to Heroku. For example, if you need the admin plugin and a theme, add them in composer like in