In this article, we will learn how to connect PHP with Azure Web app using FileZilla FTP client and Microsoft Cloud Service.

Prerequisites

  • Sign into Azure Portal.
  • FileZilla FTP Client.

Azure Web Apps:

Azure Web Apps enables you to build and host web applications in the programming language of your choice without managing infrastructure. It offers auto-scaling and high availability, supports both Windows and Linux, and enables automated deployments from GitHub, Visual Studio Team Services, or any Git repo.

PHP:

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML. it is open source scripting language so you can free download this and use.

Step 1:

Go to “portal.azure.com” and sign into your account.

Azure Portal Login

Step 2 

Select New >> Web+Mobile >> Web app to create the app.

Leaderboard_CDR
Web view

Step 3 :

Give any name to your app and create resource group with unique name, check the “Pin to dashboard” checkbox and click “Create”.

dashboard

Step 4 :

Then, go to notifications area. You will see that the deployment has been successful for the web app.

notifications

Step 5: 

Now, go to Azure Dashboard for deployment of the web app and click on the portal to open the web app, as shown below.

web app

Step 6: 

Subsequently, click on the URL to see the output (or) go to Web Browser and type the web address of the web app name to see the output (Please refer the below image).

web app-1Output:Output

Step 7: 

Open FileZilla to connect with Azure Cloud Service.
Firezillafire zilla

Step 8: 

Then, go to deployment credentials, fill in the username and password, and click “Save” button to create the FTP hostname and FTP Username.

deployment

Step 9:

Then, copy the FTP Hostname and FTP Username to the FileZilla FTP client to connect the PHP

credential4

Step 10:

After putting all the credentials, click “Quick Connect” to connect the Web app with Azure Services.

Quick Connect

Step 11: 

Type the PHP code in notepad file and save it with “.php” extension so as to create the PHP file.

notepad-1

savenotepad

Step 12 :

Open FileZilla again and go to Site, select wwwroot, then drag the PHP file until the status is verified. Once the file is verified, go to the web app URL and append the PHP file name at the end of the URL after a forward slash, like (/nav.php).

wwwroot

web app URLoutput1

In this articles I have explained how to add PHP app in your azure cloud. I hope this blog will be useful to configure your web application to Azure Web App. if you have any questions about this article, please feel free to comment with some suggestions.