Prerequisites
- A Zerops account
- Basic knowledge of PHP
Deploy from Recipe
The fastest way to get started is to deploy our ready-made PHP example:Import the Project
Log in to Zerops GUI and click Import a project.
Deploy Your Own PHP Application
Step 1: Add zerops.yaml
Create azerops.yaml file in your repository root:
Step 2: Configure Your Service
Create a service using Zerops CLI or GUI:- Using zCLI
- Using GUI
Create a Import the project:
description.yaml:Step 3: Deploy Your Code
- From Git
- Using zCLI
Connect your GitHub repository in the Zerops GUI:
- Go to your service detail
- Click Build & Deploy Pipeline
- Select GitHub or GitLab
- Choose your repository and branch
- Click Deploy
Common Configurations
Laravel Application
WordPress Site
Custom PHP API
Adding a Database
Extend yourdescription.yaml to include a database:
Environment Variables
Set environment variables inzerops.yaml:
- Go to service detail
- Click Environment Variables
- Add your secrets (database passwords, API keys, etc.)
Customize PHP Configuration
Adjust PHP settings via environment variables:Troubleshooting
Build fails with Composer errors
Build fails with Composer errors
Make sure your
composer.json and composer.lock are committed to your repository.Try running with verbose output:404 errors on all pages
404 errors on all pages
Check your
documentRoot setting. For Laravel/Symfony, it should be:PHP version mismatch
PHP version mismatch
Ensure your
build.base and run.base use the same PHP version:Next Steps
Runtime Overview
Learn about PHP runtime features
Environment Variables
Manage secrets and configuration
Scaling
Configure auto-scaling
Custom Domains
Add your own domain