I am looking for hosting for my website, which is built in PHP. In the past I have used GoDaddy (first few websites), but would like to use a more advanced hosting company.
Does Heroku support a PHP website? There are a lot of answers about a Facebook application, but none about a PHP + MySQL website.
Heroku recognizes an app as PHP by the existence of a composer. json file in the root directory. The composer. json file specifies the dependencies that should be installed with your application.
We have deployed a PHP project to Heroku, made a remote MySQL database, configured the database using PHPMyAdmin, and finally connected our app to the database.
Default behavior. Heroku will launch a FastCGI Process Manager (PHP-FPM) application server. This application server will accept requests to execute PHP files from a web server, either Apache or Nginx.
Heroku supports PHP de facto. They originally supported PHP for Facebook apps specifically but now host many production PHP sites that are not Facebook apps. (Source -- direct communication with Heroku sales earlier this year.)
There is an official PHP buildpack (see the docs for info on what buildpacks are and how they work).
There are also many unofficial PHP buildpacks that improve on the original. The official PHP buildpack has a single blocking Apache worker and little support for add-ons. It also doesn't use Vulcan to build binaries. See my buildpack, intended for Wordpress or other memory-intensive applications, or my buildpack's parent, the Winglian buildpack.
UPDATE: Heroku now officially supports PHP and provides a drastically improved official buildpack.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With