Skip to main content
Virtus Cloud supports PHP applications with built-in Composer support and a pre-configured local PHP server. When you deploy a PHP project, the platform automatically installs your Composer dependencies if a composer.json file is present, then starts the application using the PHP built-in server. You can override the default behavior entirely with a custom START command, making it easy to deploy Laravel, Symfony, or any other PHP framework. This guide covers everything you need to deploy your PHP project.

Prerequisites

Before you deploy, make sure you have the following:

PHP version

Virtus Cloud provides the following PHP versions:
VERSION valuePHP version
recommended8.4.11
latest8.4.11
Use VERSION=recommended for all production deployments.

Create your config file

Every Virtus Cloud deployment requires a virtuscloud.app configuration file at the root of your project. Set MAIN to your PHP entry-point file (typically index.php).

Config File Reference

Learn every available parameter — MAIN, MEMORY, VERSION, DISPLAY_NAME, SUBDOMAIN, START, and more.
virtuscloud.app
MAIN=index.php
MEMORY=512
VERSION=recommended
DISPLAY_NAME=My PHP App
SUBDOMAIN=myapp

Startup behavior

Virtus Cloud determines how to start your application based on whether the START field is set in your config file.
  • If START is not set, the platform starts a local PHP server using php -S 0.0.0.0:80, making your application available on port 80.
  • If START is set, the platform executes the START command directly, bypassing the built-in server.
If your project includes a composer.json file, Virtus Cloud runs php composer.phar install automatically before starting the server to install all declared dependencies.
If your project has both PHP dependencies (composer.json) and Node.js dependencies (package.json), use the START field to run both install steps before starting the server:
START=npm install && php -S 0.0.0.0:80 index.php

Required files

Your ZIP archive must include the following files:
FilePurpose
virtuscloud.app or virtuscloud.configPlatform configuration
index.php (or your MAIN file)Application entry point
composer.json (optional)Composer dependency manifest
The virtuscloud.app config file must be at the root of the ZIP archive. If it is inside a subfolder, Virtus Cloud cannot find it during deployment.
composer.json is optional. If it is present, Virtus Cloud will install all listed dependencies automatically. If it is absent, the platform starts your application without running Composer.

Upload your project

Once your files are ready, package them into a .zip archive and upload using your preferred method.
1

Install the CLI

If you do not have the Virtus Cloud CLI installed, run the appropriate command for your system:
curl -fsSL https://cli.virtuscloud.app/install | bash
To update an existing installation:
virtuscloud update
2

Authenticate

Retrieve your API key from virtuscloud.app/account by clicking Request API Key, then run:
virtuscloud login
3

Deploy

From your project directory, run:
virtuscloud upload
Or pass the path to an existing ZIP file:
virtuscloud upload my-project.zip

Troubleshooting

This error appears when the file path in your MAIN parameter does not match a file in your ZIP archive. Check that the filename is correct. If your entry point is inside a subfolder, use the relative path — for example, MAIN=public/index.php.
The minimum RAM for a bot is 256 MB and for a website or API is 512 MB. If your PHP application is running out of memory, increase the MEMORY value in your config file. See the LACK_OF_RAM troubleshooting guide for details.
If php composer.phar install fails during startup, check your composer.json for syntax errors or incompatible package versions. Run composer install locally first to confirm your dependencies resolve correctly before uploading.
If you continue to experience issues after reviewing this guide, contact the Virtus Cloud support team.