PHPackages                             devinterx/heroku-buildpack-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. devinterx/heroku-buildpack-php

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

devinterx/heroku-buildpack-php
==============================

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP/HHVM and Apache2/Nginx as on Heroku

v65(11y ago)022MITShell

Since Apr 29Pushed 11y ago1 watchersCompare

[ Source](https://github.com/devinterx/heroku-buildpack-php)[ Packagist](https://packagist.org/packages/devinterx/heroku-buildpack-php)[ Docs](http://github.com/devinterx/heroku-buildpack-php)[ RSS](/packages/devinterx-heroku-buildpack-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)DependenciesVersions (59)Used By (0)

Heroku buildpack: PHP
=====================

[](#heroku-buildpack-php)

This is a [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks) for PHP applications.

It uses Composer for dependency management, supports PHP or HHVM (experimental) as runtimes, and offers a choice of Apache2 or Nginx web servers.

Usage
-----

[](#usage)

You'll need to use at least an empty `composer.json` in your application.

```
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php
echo '{}' > composer.json
git add .
git commit -am "add composer.json for PHP app detection"

```

Please refer to [Dev Center](https://devcenter.heroku.com/categories/php) for further usage instructions.

Development
-----------

[](#development)

### Compiling Binaries

[](#compiling-binaries)

The folder `support/build` contains [Bob](http://github.com/kennethreitz/bob-builder) build scripts for all binaries and dependencies.

To get started with it, create a Python app (*Bob* is a Python application) on Heroku inside a clone of this repository, and set your S3 config vars:

```
$ heroku create --buildpack https://github.com/heroku/heroku-buildpack-python
$ heroku ps:scale web=0
$ heroku config:set WORKSPACE_DIR=/app/support/build
$ heroku config:set AWS_ACCESS_KEY_ID=
$ heroku config:set AWS_SECRET_ACCESS_KEY=
$ heroku config:set S3_BUCKET=
$ heroku config:set S3_PREFIX=

```

Then, shell into an instance and run a build by giving the name of the formula inside `support/build`:

```
$ heroku run bash
Running `bash` attached to terminal... up, run.6880
~ $ bob build php-5.5.11RC1

Fetching dependencies... found 2:
  - libraries/zlib
  - libraries/libmemcached
Building formula php-5.5.11RC1:
    === Building PHP
    Fetching PHP v5.5.11RC1 source...
    Compiling PHP v5.5.11RC1...

```

If this works, run `bob deploy` instead of `bob build` to have the result uploaded to S3 for you.

To speed things up drastically, it'll usually be a good idea to `heroku run bash --size PX` instead.

If the dependencies are not yet deployed, you can do so by e.g. running `bob deploy libraries/zlib`.

### Hacking

[](#hacking)

To work on this buildpack, fork it on Github. You can then use [Anvil with a local buildpack](https://github.com/ddollar/anvil-cli#iterate-on-buildpacks-without-pushing-to-github) to easily iterate on changes without pushing each time.

Alternatively, you may push changes to your fork (ideally in a branch if you'd like to submit pull requests), then create a test app with `heroku create --buildpack ` and push to it.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 90.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Total

53

Last Release

4105d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6422d6c7ee20af614858f3f5a360e03ea3b9b3638e838bf7590c8e415edf6dfa?d=identicon)[devinterx](/maintainers/devinterx)

---

Top Contributors

[![dzuelke](https://avatars.githubusercontent.com/u/27900?v=4)](https://github.com/dzuelke "dzuelke (426 commits)")[![tmaher](https://avatars.githubusercontent.com/u/297632?v=4)](https://github.com/tmaher "tmaher (11 commits)")[![ryanbrainard](https://avatars.githubusercontent.com/u/966764?v=4)](https://github.com/ryanbrainard "ryanbrainard (8 commits)")[![devinterx](https://avatars.githubusercontent.com/u/1332516?v=4)](https://github.com/devinterx "devinterx (7 commits)")[![technomancy](https://avatars.githubusercontent.com/u/141?v=4)](https://github.com/technomancy "technomancy (6 commits)")[![fdr](https://avatars.githubusercontent.com/u/7191?v=4)](https://github.com/fdr "fdr (4 commits)")[![ptarjan](https://avatars.githubusercontent.com/u/40143?v=4)](https://github.com/ptarjan "ptarjan (1 commits)")[![md-5](https://avatars.githubusercontent.com/u/1007849?v=4)](https://github.com/md-5 "md-5 (1 commits)")[![deguif](https://avatars.githubusercontent.com/u/993399?v=4)](https://github.com/deguif "deguif (1 commits)")[![martijngastkemper](https://avatars.githubusercontent.com/u/250662?v=4)](https://github.com/martijngastkemper "martijngastkemper (1 commits)")[![ddollar](https://avatars.githubusercontent.com/u/3308?v=4)](https://github.com/ddollar "ddollar (1 commits)")[![mdz](https://avatars.githubusercontent.com/u/436911?v=4)](https://github.com/mdz "mdz (1 commits)")[![mmcgrana](https://avatars.githubusercontent.com/u/2432?v=4)](https://github.com/mmcgrana "mmcgrana (1 commits)")

---

Tags

phphhvmnginxherokuapacheapache2foreman

### Embed Badge

![Health badge](/badges/devinterx-heroku-buildpack-php/health.svg)

```
[![Health](https://phpackages.com/badges/devinterx-heroku-buildpack-php/health.svg)](https://phpackages.com/packages/devinterx-heroku-buildpack-php)
```

###  Alternatives

[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[corley/maintenance-bundle

Corley Maintenance Bundle

22229.9k](/packages/corley-maintenance-bundle)[renoki-co/laravel-healthchecks

Laravel Healthchecks is a simple controller class that helps you build your own healthchecks endpoint without issues.

5654.9k](/packages/renoki-co-laravel-healthchecks)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
