In this blog, we are going to create and host a WordPress website on Azure using WordPress Bitnami stack and add the custom domain to it.
WordPress is one of the world’s most popular web publishing platforms for building blogs and websites. From blogging to e-commerce to business and portfolio websites, WordPress is a versatile CMS. Designed with usability and flexibility in mind, WordPress is a great solution for both large and small websites.
There are different ways of hosting a WordPress site on Microsoft Azure. In this blog, we are going to use the Bitnami stack where we will use Bitnami WordPress pre-configured Ready-to-Run Image.
Create a Virtual Machine
First login to your Azure Portal and click on Create a resource.
Search for ‘wordpress’ and hit Enter.
Search for WordPress Certified by Bitnami and click on it.
Then hit Create.
After that, fill out some basic information. Choose your Subscription and resource group. Create a new resource group if you don’t have any. Then your VM name, region, machine size and your username and password.
Then click on Review + create. If it is still asking for some details, fill that and hit Create.
After the installation, Go to the resource and under Essentials, you can see the Public IP address.
Copy that and open it on your browser.
Just a few clicks and now you have your WordPress site on Azure.
Access to WordPress Admin Dashboard
To access the WordPress Admin Dashboard, go to ‘http://your-public-IP-address/wp-login.php‘. Eg: http://188.8.131.52/wp-login.php
Now for username, the default username if ‘user‘.
And for password, in your Azure VM Dashboard, go to Boot diagnostics.
Click on Serial log and once it loads, click somewhere on your log. Then press ‘CTRL + F‘ and search for ‘password‘. Search for next match until you find something like “Setting Bitnami application password to ‘************’“.
The ‘************‘ is your WordPress Admin password.
In this way you can access your WordPress Admin Dashboard.
Connect to Virtual Machine
Now to connect to the virtual machine in Azure, there are different ways. In this blog, we are going to use the simple way via terminal.
To work with commands, we can use any SSH clients like PuTTY, KiTTY, Xshell 5, Git Bash, etc. Here I am going to use Git Bash.
Open Git Bash and enter the ssh command:
For example here, I had used ‘myuser‘ as username and my public IP address is 184.108.40.206.
So, I will use:
Enter the password and you have connection with your VM.
Remove the Bitnami Badge from Azure WordPress
Since now, we have connection with our VM, one thing we can do is to remove the Bitnami badge which appears on bottom right of our site.
To remove the Bitnami badge, simply use the command below, while you have connection with your VM.
sudo /opt/bitnami/apps/wordpress/bnconfig --disable_banner 1
Refresh the page and the badge should be gone now.
Add Custom Domain to the VM
Now of course we cannot tell our user to type the public IP address, 220.127.116.11, every time to visit our website. So, to add the custom domain to your VM, we will be using CNAME record here.
If you want to know more about how domain names resolves to IP address, please check out this post on How the Web Works.
Now from your resource group, choose the resource group where your vm is. In our case it is ‘vm‘.
Then choose the Public IP Address.
Go to Settings, then inside that, Configuration.
In the ‘DNS name label (optional)‘ section, type a unique name and if it is available, hit Save.
So, now your DNS name label will be
ChosenName.VMLocation.cloudapp.azure.com. Meaning, you can access your website using this URL.
In my case, I have used the name
mywpwebsite. And my VM location is west Europe. Thus now I can access my site via the URL : http://mywpwebsite.westeurope.cloudapp.azure.com/
Now all we need to do is align our custom domain name with this DNS name label. Go to your DNS provider site and manage DNS settings. Fill the fields as:
Save the DNS settings and you are all set.
You should be able to access your VM using your custom domain name.