Advertisment

Setting up a WordPress Website on MS Azure

author-image
Mastufa
New Update

Before we begin, here are a few pointers.

Advertisment

1. Unlike AWS, Azure doesn't give you a one year long free access to a micro instance. Rather they provide a one month trial subscription.

2. In a trial subscription. You can't point your own DNS name to the virtual machine you create. And you have to rely upon a subdomain of cloudapp.net.

So technically, you can't build a live website on Azure for free. But still, you can certainly create a demo instance and give it a shot.

Advertisment

And that's exactly what we are going to do here.

Step 1

Go to http://windowsazure.com and click on the Free Trial option at the top right hand side. Here we are assuming that you have an email ID which has never been registered with Azure before. Otherwise, your email ID willl not be eligible for the one month's free trial subscription.

Advertisment

Step 2

In the next screen, you have to fill in your personal and payment details. The payment details make sure that you continue using this account after first month or you over-consume your $200 worth of free trial allowance, Microsoft can charge your card for the same. Fill in all the details and proceed.

Step 3

Once your credit card and your email ID is verified (which should not take more than a couple of minutes) you will see the screen below. This confirms that you have 30 days of free trial available in your account.

Advertisment

Step 4

Now click on Portal at the right hand top corner and you will see the control panel for Azure. But as a first timer, you will be welcomed by a popup which gives you a 30 second tutorial about using Azure. You can very well skip it or just flip throw the five slides.

Advertisment

Step 5

Now you are on the control panel. Or as they call it the Azure Portal. Here click on virtual machine and then click on Create Virtual Machine. This basically lets you create an IaaS instance on Azure.

Step 6

Now the New Virtual Machine wizard will open. Here expand Compute Virtual Machine Quick Create. You will see a form open up in the right hand pane of the window. Here fill in the machine name and the OS and system type. We will call this machine pcquestdemo. And to make sure we compare apples to apples or say Linux to Linux. We will create a CentOS machine to match our instance in AWS. Also we will use the extra small instance which is equivalent to a micro instance in AWS. And we will use the zone as South Asia. As in our AWS test as well, we used Singapore as the zone. For a quick reference on the selection. See the screenshot below.

Advertisment

Step 7

Once you are done with the creation wizard. You will see the following scree. And the status of the Virtual Machine will show up as Running in a couple of minutes. Once it starts showing the status as running, you should know your machine is ready to be used.

Advertisment

Step 8

Now the next and most important thing you have to do is to open port 80 so that we can run a web server on it. Also on a Linux machine, the SSH port is by default on. You can also validate that while opening port 80. To do so, click on the one next to the virtual machine name. This will open the dashboard for the instance. Now on the top click on the endpoints tab. Here you should see a screen like below. Which already has port 22 (SSH) added.

Step 9

Now click on the Add button in the bottom center of the screen. It will open a new wizard. In the first screen of the wizard, click on "Add Standalone Endpoint" radio button and proceed.

Step 10

In the next screen, select http from the drop down menu. And it should auto select port 80 for netting in both internal and external IP. Just make sure the last check box which says ‘Create a Load-balanced Set' is unchecked. Now just click on the tick mark button and port 80 is enabled on the firewall for the virtual machine you have just created.

Step 11

Now click back on the dashboard tab. And you will see a page link below. This page will give you all the details about the virtual machine and how to connect to it. The DNS name is the name on which you have to connect with SSH. In our case, the DNS name is pcquestdemo.cloudapp.net. And the default user name for the SSH user is azureuser. You can verify that in Step 6 screenshot. So the SSH connection string will be SSH azureuser@pcquestdemo.cloudapp.net in our case. Just use your favorite SSH client to connect to this. And use the password which you have set in Step 6. You should be able to login to the virtual machine. Now you can simply run ‘sudo su -' to gain the root privilege in the system.

This was how to setup a WordPress based website on MS Azure. Next month, we'll tell you more things you can do on cloud computing platforms, and even compare their performance.

Advertisment