In this article we will compare the cost of using Azure Services to Deploy a WordPress Blog. Imagine we are a newbie writer who has dreams to be a well known tech blogger. We are tempted to use Azure because our friend suggested this, and of course, it is Microsoft, a standard for professionals. Though we will visit other options along the line, including the competitors, and the plug and play website.
After a bit of research, I found out there are 3 ways to deploy WordPress to Azure. Basically, we will need a PHP hosting / server and MySQL server. The first is to use the Azure App Service with Windows Operating System and it’s included MySQL In Apps database. The second option is using the Azure App Service Linux version combined with a stand-alone Azure database for MySQL. Lastly, we use the old school Virtual Machine to boot up the WordPress and put the database in it.
Method 1 – Azure App Service Windows Version
The first one is using Azure App Service. In the Windows version, Azure provides an experimental “MySQL In App” feature. It is said that this is not intended for Production because it will not scale beyond a single instance. But since we are a start from zero to hero type of person, anything that is free will do.
Now, we will start by creating a Resource Group, then from the create menu, click web and choose Create A Web App. We fill everything that needs to be filled, choose the Windows as the Operating System, and choose the PHP stack. For the App Service Plan, we choose the B1 (see the picture below).
We choose the B1 because we need the customized domain and the S in the https. It is important for branding and security. We wouldn’t want our blog to use weird prefixes like myblog.azure.xxx.com right?. Now the cost is expected to be around 500.000 rupiah a month we will see about that later.
I will not explain the steps to deploy WordPress here, maybe in another article, but let’s just say the WordPress is installed and running. We will expect a few visitors now and then, but nothing too much.
Method 2 – Azure App Service Linux Version
The Second way is by using the Linux version of the Azure App Service. The difference with the first method is for the same Tier (B1), the price of the Linux version is almost one third of the windows version. The drawback is that we need to have our own MySQL database. There’s no “In App MySQL” for this one.
For the database, we will set a different Resource Group to make it easier to see the cost of this service. There are 2 different version of Azure Database for MySQL, at the time of starting this experiment, the Flexible version is on Preview, but at the time we create this post, it’s already live.
We set everything to minimum, from IOPS, Storage, and without redundancy or auto-growth. We also left High availability uncheck and Backup as is. For the compute unit, we select the Standard B1s which has 1 vCore and 1 GiB Memory.
After everything set up, access the MySQL using 3rd party apps, create Database and connect the WordPress.
Method 3 – Old School Virtual Machine
Lastly, this is the common method. We boot up a Virtual Machine, then install XAMPP inside the VM, or if you feel lucky, you can just install everything manually if you speak Linux ( I am talking about MySQL, Nginx, Apache and setup everything. ). In this experiment, we will use the “MySQL packaged by Bitnami” for the image. There is another option, such as “WordPress with Nginx and SSL packaged by Bitnami”, it doesn’t matter what you choose.
For the VM size, we will select the lowest and cheapest machine available. That would be the B series. Now, depending on what region you choose, you can select between B1ls or B1s. The B1ls has 1 vCpus, 0.5 of RAM, and 4gb temporary storage. On the other hand, The B1s have twice the Ram, but almost twice the price.
If you see the screenshot, it looks super cheap right?. Well, there are a few hidden costs you need to consider. Well it kinda shows before you click create, but you need to calculate yourself based on your need. We assume that there are only 1 to 10 visitors for this website per month. Quite low expectation for an aspiring tech blogger huh.
There’s also questions about the 0.5 Gb of ram, is that sufficient? According to the MySQL website it should suffice. Then again, if the memory starts to run out, we can always upgrade/ scale out the VM.
Finally
Now after setting all those variants up, we just leave it running for a month to see how much the Azure cost us. We expect 1 to 10 random visitors and me to update the WordPress from time to time. So, it’s not exactly a stress test or anything like that. We stick to the scenario, a wannabe tech blogger.
One Month Later
One month later. The experiment was started in September 2021, but due to stuff happening, I wrote this article in December, and used data from the 1st of November till 30th of November.
First of all, I was expecting the result would be half or one per third of Azure’s estimated price because all of the websites are new. According to google analytic, there are 79 sessions and 24 users accessing the website. Yet, the data is not valid since I only install the analytics in one site, the 2nd function / method B.
Secondly, as expected, the Virtual Machine method has few additional services to run beside the Virtual Machine. It was estimated to be around IDR 75.000 rupiah. With additional services, it became IDR 203.000 rupiah, almost twice the amount of the estimates.
Then, between method A and B, method B is 10% lower than the estimation given. While method A is only 2% cheaper than estimation.
Finally, from those 3 methods, method 3 is the cheapest way to deploy a website to Azure, followed by method 2 and 1. But, setup wise, it is the opposite. It is easier to deploy using method 1, then 2 and 3. Easier in terms of running, maintenance, and scaling.
My personal opinion, method 2 is the best way to deploy WordPress to Azure. We only maintain 2 services compared to Virtual Machine methods, yet we are ready to scale out / up the database compared to the “In App MySQL” provided by Method 1.
That conclude the experiment, I will use the 2nd method from now on. If you have any question just email me. Thank you for reading.