Documentation

php2go documentation

A practical user guide: prepare a ZIP, choose an entrypoint, run allowed commands, download the artifact, and understand common compiler errors.

Fast path to the first build
  1. Pack the project into a ZIP without secrets or junk files.
  2. Make sure the entrypoint exists, usually public/index.php.
  3. Run report/check/deps before compile.
  4. Download the artifact and run the binary using README_RUN.
ZIP

How to prepare a ZIP

Upload a regular project archive: source code, public directory, vendor if needed, and composer.json. Do not include secrets, caches, dumps, or large temporary files.

Include this

  • Application source code and front controller.
  • vendor if the project cannot run composer install on the server.
  • composer.json/composer.lock for dependency analysis.
  • Example configs without passwords or tokens.

Do not upload

  • .env, private keys, access tokens, and auth.json.
  • .git, .ssh, node_modules, var/cache, tmp, and logs.
  • Database dumps, user uploads, and nested archives.
  • Suspicious extensions or overly deep directory nesting.
Good structure example
my-project.zip
└── my-project/
    ├── public/
    │   └── index.php
    ├── app/
    ├── src/
    ├── vendor/
    └── composer.json