Skip to main content

Set up a local development environment for Temporal and PHP

To follow the PHP SDK tutorials and build your own Temporal applications with PHP, you'll need the PHP SDK, the RoadRunner application server, and a Temporal development server.

Install the PHP SDK

Install the PHP SDK using Composer:

composer require temporal/sdk

Download RoadRunner

See the RoadRunner README file for installation instructions.

Set up a Temporal development cluster

Download and install the Temporal development cluster locally using Docker Compose. You'll run this server in the background while you develop your applications.

You must have Docker and Docker Compose installed.

Then clone the temporalio/docker-compose repository and run docker-compose up from the root of that repository:

git clone https://github.com/temporalio/docker-compose.git
cd  docker-compose
docker-compose up

When the Temporal Cluster is running, the Temporal Web UI becomes available in your browser: localhost:8080

Review other methods in the Run a dev Cluster section in Temporal's documentation.

Once you have everything installed, you're ready to build apps with Temporal on your local machine.