Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Heroku support PHP? [closed]

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.

like image 401
Don P Avatar asked Nov 11 '12 18:11

Don P


People also ask

Does heroku work with PHP?

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.

Does heroku support PHP and MySQL?

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.

Does heroku use Apache?

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.


1 Answers

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.

like image 184
Andrew Gorcester Avatar answered Oct 13 '22 17:10

Andrew Gorcester