Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

As PHP version 5.5 is no longer supported by the community, we strongly recommend new apps use the PHP 7+ runtime.

Deploying to App Engine

This page shows you how to deploy the guestbook sample app to App Engine.

This page is part of a multi-page tutorial. To start from the beginning and see instructions for setting up, go to Creating a Guestbook.

Deploying your application

To upload the guestbook app, run the following command from within the appengine-php-guestbook directory of your application where the app.yaml file is located:

gcloud app deploy

Optional flags:

  • Include the --project flag to specify an alternate console project ID to what you initialized as the default in the gcloud CLI. Example: --project [YOUR_PROJECT_ID]
  • Include the -v flag to specify a version ID, otherwise one is generated for you. Example: -v [YOUR_VERSION_ID]

To learn more about deploying your app from the command line, see Deploying a PHP App.

Viewing your application

To launch your browser and view the app at https://PROJECT_ID.REGION_ID.r.appspot.com, run the following command:

gcloud app browse

What's next