Monday, December 21, 2015

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.
If you want to have a Managed MySQL Installation you may follow the steps given here https://azure.microsoft.com/en-in/documentation/articles/web-sites-php-web-site-gallery/  


You’ll learn

  1. How to make a blank WebApp
  2. Upload your local wordpress installation with config changed to link with the MySQL
  3. Installing plugins with your wordpress installation

I am assuming you have a running MySql on your Azure Virtual Machine.

Download Wordpress


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


  1. Go to Azure Portal at http://portal.azure.com
  2. 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

  1. 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
  1. 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.
  2. 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

  1. I assume that you have a running MySql VM and you know its username and password.
  2. Open the Web App page at http://.azurewebsites.net
  3. 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


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.








No comments:

There was an error in this gadget