So let's start
- First of all open Azure Portal
- Open Azure CLI in the portal, or you can also login in your local terminal.
-
Create a resource group:
az group create --name myResourceGroup --location "West Europe"
-
Create an App Service Plan:
az appservice plan create --name myAppServicePlan --resource-group myResourceGroup --sku FREE
-
Create Web App:
#Bash az webapp create --resource-group myResourceGroup --plan myAppServicePlan --name --runtime "PHP|7.4" --deployment-local-git #PowerShell az --% webapp create --resource-group myResourceGroup --plan myAppServicePlan --name --runtime "PHP|7.4" --deployment-local-git
You should see something below as the output:Local git is configured with url of 'https://@.scm.azurewebsites.net/.git' { "availabilityState": "Normal", "clientAffinityEnabled": true, "clientCertEnabled": false, "cloningInfo": null, "containerSize": 0, "dailyMemoryTimeQuota": 0, "defaultHostName": ".azurewebsites.net", "enabled": true, < JSON data removed for brevity. > }
http://your-app-name.azurewebsites.net
And you should see page like below
-
Now navigate to your project directory in your local
-
Create a new file named
index.php
in your project root and write the following line in the file:
<?php
include_once("index.html");
?>
{}
git init
git add .
git commit -m "Initial Commit"
git remote add azure your-deploymentLocalGitUrl-from-create-step
git push azure master
http://your-app-name.azurewebsites.net
Top comments (0)