This is an example of how to set up a PHP application to deploy on Kinsta’s Application Hosting services.

During the deployment process, Kinsta automatically installs dependencies defined in your composer.json file.

  1. Fork this GitHub repository: Kinsta – Hello World – PHP.
  2. In MyKinsta, add an application with the Hello World PHP repository. The Start command can be left blank for the web process as Kinsta automatically detects the required command during the first deployment.

The app is available as soon as the build finishes, and a Hello World page loads at your application’s URL.

PHP Hello World page after successful installation.
PHP Hello World page after successful installation.

Web Server Setup

Kinsta automatically configures an apache web server that serves from the main directory of the project in the usual fashion; create an index.php file in your project folder as the Start command.