Runway
Runway is built and operated in the EU!

No framework

First steps

Way back, PHP was designed to be a language without framework.

Since then, lots of frameworks have been created with Laravel and Symfony being among the most popular today.

Despite the availability of frameworks, you can still use PHP without them - and here is what you must do to deploy your no-framework application on Runway.

Web Server

Create the project:

mkdir no-framework-app && cd no-framework-app

All you need is a web server. Imagine the following file tree:

.
└── htdocs
   └── index.php

This is by far the most basic example we can come up with.

The index.php could be the following:

htdocs/index.php
<?php
phpinfo(INFO_ALL & ~INFO_ENVIRONMENT & ~INFO_VARIABLES);

Configure your application to use Apache (php-fpm will come on its own):

Runway CLI
runway app config set BP_PHP_SERVER=httpd
project.toml
[build]
  [[build.env]]
    name="BP_PHP_SERVER"
    value="httpd"

Deploying this example will show you a phpinfo() which displays the installed PHP version and the PHP extensions which are enabled by default.

Create the app on Runway (this also initializes a git repository, if none exists yet), then commit your changes:

runway app create
git add -A && git commit -m "initial commit"

Deploy to Runway

runway app deploy

Run runway app open to see it live, or check the Runway UI. Check runway app logs if something’s off.

More?

Read on here, to learn how to enable custom extensions, e.g. to be able to use your PostgreSQL database on Runway from PHP!

If your app needs background work, or a step that runs before every deploy, see workers and init processes.