To answer the question in your title, Heroku isn't really suited to hosting only static HTML. It is designed for running web applications, not web sites. I don't think Heroku even has an HTML-only buildpack, and I would strongly advise using another host for that purpose. There are many options for hosting static HTML at very low cost.
However, it sounds like what you actually want is to host PHP. Initially, Heroku's build process attempts to detect the language of your application using some basic heuristics and then uses an appropriate buildpack. (After it detects a buildpack once that buildpack will be used again in the future.)
To get Heroku to detect a PHP application you must include a composer.json
file in the root directory of your project:
Heroku PHP Support will be applied to applications only when the application has a file named composer.json
in the root directory. Even if an application has no Composer dependencies, it must include an empty composer.json
in order to be recognized as a PHP application.
If you are using Composer to manage dependencies, you must also include your composer.lock
file.