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 installed locally. Download it from the official PHP website.
- A Virtus Cloud account — sign up at virtuscloud.app/login using your email or Discord.
- An active paid plan on your account. Browse plans at virtuscloud.app/plans.
PHP version
Virtus Cloud provides the following PHP versions:VERSION value | PHP version |
|---|---|
recommended | 8.4.11 |
latest | 8.4.11 |
Create your config file
Every Virtus Cloud deployment requires avirtuscloud.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
Startup behavior
Virtus Cloud determines how to start your application based on whether theSTART field is set in your config file.
- If
STARTis not set, the platform starts a local PHP server usingphp -S 0.0.0.0:80, making your application available on port 80. - If
STARTis set, the platform executes theSTARTcommand directly, bypassing the built-in server.
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:Required files
Your ZIP archive must include the following files:| File | Purpose |
|---|---|
virtuscloud.app or virtuscloud.config | Platform configuration |
index.php (or your MAIN file) | Application entry point |
composer.json (optional) | Composer dependency manifest |
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.
- CLI upload
- Dashboard upload
Install the CLI
If you do not have the Virtus Cloud CLI installed, run the appropriate command for your system:To update an existing installation:
Authenticate
Retrieve your API key from virtuscloud.app/account by clicking Request API Key, then run:
Troubleshooting
The main file is invalid or corrupted
The main file is invalid or corrupted
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.Bad Memory
Bad Memory
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.Composer dependency errors
Composer dependency errors
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.