Setting up a Custom Wordpress Website using Azure Web Apps with a Custom VM based MySql and Installing Plugins
This tutorial shows you how to setup a very simple Wordpress website using Azure WebApps with Custom Mysql DB Installation and Installation of plugins. This tutorial showcases the scenario where you don’t have a managed Azure MySql setup (via ClearDb), rather you are running your own MySql in a VM.
When you are done with the tutorial you will have a running Wordpress website using Azure WebApps (PAAS based Webapp offering by Microsoft), and you’ll know how to install plugins in your WebApp based Wordpress installation.
- How to make a blank Web App
- Upload your local Wordpress installation with config changed to link with the MySQL
- Installing plugins with your wordpress installation
I am assuming you have a running MySql on your Azure Virtual Machine.
First off, we need to get a copy of Wordpress from https://wordpress.org/download/ , download, unzip and keep it.
Create a Blank Azure Web App
- Go to Azure Portal at http://portal.azure.com
- Go to New — Web+Mobile — Web App
3. Enter the name of your Wordpress Web App, select a Resource Group, and proper App Service Plan.
4. Click on “Create”, this will create a Blank Web App for you that you can browse to and you should see a view like this.
Uploading the code at our Web App
- Download the publish profile so we could get the FTP endpoints at which we should upload our code
Click over your Web App in resources and then Click over “Get Publish Profile” button
This should download a .publishsettings file
- Open the Publish Settings file and note that it’s a XML File, copy the tags publishUrl, username and userPWD, these are our FTP endpoints at which we will upload the basic WordPress website and later configure.
- Use any FTP Client and these endpoints that we just collected and open your FTP endpoint, and copy over the Wordpress code that we downloaded from wordpress.org to the site/wwwroot folder
Running setup of Wordpress
- I assume that you have a running MySql VM and you know its username and password.
- Open the Web App page at http://.azurewebsites.net
- Select Language
4. Click “Continue”, the next page will show you the Database settings page where in you should be filling the details about the MySql login that you have already setup at your other VM, make sure that you use internal IP of your MySql VM, you may have to create the Blank Wordpress database in Advance.
5. Once the Wordpress setup confirms your MySql Credentials, we can now start the Install.
6. On the Next Page, fill in your site title, UserName and Password (You’ll need those to administer your wordpress website), and Click “Install Wordpress”
7. Bang on! right after, you’d see a page that’ll ask you to login, login with the credentials you have just set, and you’ll be taken to your hot new Wordpress WebApp
Installing plugins becomes much easier with an Azure Web App as it comes with a default FTP endpoint so unlike other custom installations you don’t need to add FTP details to download and install a Plugin.
Just go to Plugins -> Add New and Select any plugin you want to install, I selected a plugin “Multiple themes” (You can search for your plugins) and clicked Install and Voila! It just downloads and installs.
If your setup has Continuous Deployment By FTP or Git or TFS, you can actually just work the same way as you were used to, you can even upload the plugins to FTP directly and it should just work for you.
Originally published at www.brijrajsingh.com on January 8, 2016.