Skip to main content
PHP isn’t covered by Raypacks yet, so PHP Frames use the classic Paketo builder. Switch the Frame’s Builder to Paketo in Frame Settings if it’s not already. What Paketo needs from you:
  1. A project.toml that sets a web root and a port.
  2. PHP source files (and optionally a composer.json).

Quick start

mkdir hello-php && cd hello-php
mkdir htdocs
htdocs/index.php:
htdocs/index.php
<?php
echo "Hello from PHP on Nubo!";
project.toml at the repo root:
project.toml
[project]
id = "php-starter"
name = "PHP Starter"
version = "1.0.0"

[[build.env]]
name = "BP_PHP_WEB_DIR"
value = "htdocs"

[[build.env]]
name = "PORT"
value = "8080"
BP_PHP_WEB_DIR is the folder that holds index.php. PORT sets the port PHP’s web server listens on. The Frame’s port setting should match.

Deploy

1

Push to GitHub

Commit and push.
2

New Frame on Nubo

Hit + Frame, connect the repo.
3

Confirm the port

Match what PORT is set to (8080 here).
4

Deploy

Paketo installs Composer deps if you have a composer.json, then starts PHP’s web server.

Pinning a PHP version

project.toml
[[build.env]]
name = "BP_PHP_VERSION"
value = "8.3.*"

Composer

If your repo has a composer.json, dependencies are installed automatically. Commit your composer.lock for reproducible builds.

Raypacks support

PHP is on the Raypacks roadmap. We’ll add a PHP pack once we’ve nailed the simple-deployment story. For now, Paketo is the path.