In this post, I’m going to show you how you can upload your web content to an Azure web app using FTP.
What good is a web hosting plan if you cannot put your website code on it? Azure offers a few ways to get code into an Azure web app or app service from automated solutions using the like of Visual Studio Team Services (VSTS) and GitHub to a more basic option such as using FTP.
In this post, I will show you how to use an FTP client to upload your website into a web app. My web app is called preprod. It’s actually a pre-production deployment slot for a web app called petri, which has its own FTP configuration.
Each web app and deployment slot has its own FTP username and address. You must enter a new password to use this FTP account, which is known in Azure as a deployment credential.
To set up the FTP user account, open the web app and browse to Deployment Credentials under the Deployment settings. Here you can specify the user account name and the password. Please note that the password:
Note that the FTP/Deployment Username is not the complete username that you will require in your FTP client. You will retrieve that in the next step.
You will need a server name or address to connect to with your FTP client; this can be found in the Overview of your web app or deployment slot. Note that you can find the FTP and FTPS addresses here.
You will also get the complete FTP username. In the previous step, I set the Deployment Username to petriadmin2. However, the actual username that I need to enter in my FTP client is shown below: petri__preprod\petriadmin2. It is named after the web app and deployment slot.
I have installed an FTP client on my PC and created a new connection. I entered the following information into the New Site dialog:
When I connect to the website, I can browse the web host’s file structure. You can see the familiar wwwroot folder from IIS in the below screenshot; this is where I will upload my web content.
I can now use the FTP tool to upload and download content to the web app’s folder structure. I’ve already extracted the website content on my PC and it’s an easy upload to the wwwroot folder from there.
The default document of my site is index.php. I should verify that the Application Settings of the web app or deployment slot have the following:
Now, I can browse to the URL of the web app or deployment slot and my web content should load.