Docs menu
PHP
Deploy PHP apps with Composer on Primcloud, served by Apache or nginx with PHP-FPM.
On this page
Primcloud builds any PHP app with a composer.json at the root of its repo. It installs the PHP version your Composer requirements ask for, installs your dependencies with Composer, and serves the app with Apache or nginx, both with PHP-FPM.
With no Procfile, your app is served by Apache from the repo root. Add a Procfile to set the document root, switch to nginx, or add worker and release processes.
What's in this section#
- Getting started with PHP: deploy a minimal Slim app end-to-end.
- PHP on Primcloud: detection, the build, and choosing a web server.
- Runtime versions: choosing and upgrading your PHP version.
- Package managers: Composer, private repositories, and lockfiles.
- Customizing the build: the
compilescript, web server config, PHP extensions, and system packages. - Troubleshooting PHP: common build and runtime errors with fixes.
- Deploying Laravel:
Procfile, environment variables, migrations, and Laravel-specific setup.