Skip to main content
The PHP preset provides a full PHP development environment with nginx, PHP-FPM, and Composer pre-installed.

Available Versions

Select a version when creating your pod. If not specified, PHP 8.3 is used.

What’s Included

Pre-installed PHP extensions: mbstring, xml, curl, mysql, pgsql, redis, zip, and more. Pre-installed utilities: curl, wget, vim, htop, unzip.

Directory Structure

  • App Root: /home/instapod/app
  • Public Root: /home/instapod/app/public
  • Port: 80 (nginx)
  • PHP-FPM socket: /run/php/php8.3-fpm.sock
nginx is configured to serve from /home/instapod/app/public. Place your entry point (index.php) there. Application code, configs, and vendor directory go in the parent /home/instapod/app.

Deploying Your App

Upload Files

Install Dependencies

Reload Services

After deploying or updating your code:
This restarts both PHP-FPM and nginx.

Routing

The nginx config includes try_files $uri $uri/ /index.php?$query_string, which means all requests that don’t match a file are forwarded to index.php. This works out of the box for:
  • Laravel — all routes handled by public/index.php
  • Custom routers — write your own front controller in public/index.php

File Permissions

PHP-FPM runs as the www-data user. Files uploaded via the CLI or IDE are owned by root. If your PHP app needs to write to data directories (file uploads, JSON storage, cache), you must fix permissions:
For Laravel, also set writable permissions on storage and bootstrap/cache:

Adding a Database

PHP apps commonly need a database. Install one with:
Database services require the Build plan or higher.

Use Cases

  • Laravel applications
  • Custom PHP APIs and REST services
  • Content management systems
  • PHP microservices