This step-through guide will help you launch and run the sample PHP application through the Azure Web app. In addition to PHP, Azure Web apps support other languages such as Java,. NET, node. js, Python, Ruby, and so on, and this tutorial focuses on PHP (other languages will follow the same process). All of the actions completed in this tutorial are eligible for the 1-dollar trial condition.
Before you begin
Before you run this sample, install the following prerequisites locally:
Download and install Git
Download and install PHP
If you don't have an Azure subscription, you can create a trial account before you start.
Step 1: Download the sample
1. First search and open Git Bash on your computer.
2. Enter the following command to clone the Hello World sample app to the local computer.
Step 2: Create an Azure Web app
1. Sign in to the Azure portal and create a new Web app, Web + mobile.
2. Enter "app name", "app service plan/location" to select Default. If you want more information about app service plans, go to Azure app service plan in-depth overview.
3. Select Create.
Step 3: Configure Deployment credentials
When the Web app is created, click "Deploy Credentials", enter "username" and password, and click "Save". Since Git and FTP cannot authenticate with your login account, we need to use the new username and password here to deploy the PHP app.
Step 4: Configure local Git deployment options
Click "Deployment Options", "Select Source" as "local Git repository" and click OK.
Step 5: Configure to use PHP
Select "Application Settings", "PHP version" selected as 7.0, click "Save".