3 Lessons from Hosting WordPress blog in Azure

I am hosting my WordPress website (http://scottge.net) in Microsoft Azure.   Microsoft Azure provides a very simple and straightforward wizard that allows you to create a WordPress website with just three clicks.  However, here are 3 lessons that I learnt from doing it.



Lesson 1:  The cost is not just from Microsoft Azure

At the beginning, I thought that I only need to pay for the Azure subscription in order to host my WordPress website in Azure.   It turns out that WordPress relies on a MySql database, and Azure outsourced the MySql DB to a vendor company called ‘ClearDB’.   The default free-tier MySql DB has only 20MB storage and limited connections.  According to ClearDB, this default free tier is just for test purpose.  It is really not good enough for any serious websites.


To upgrade the DB, you of course need to prepare an additional budget to pay to ClearDB.  Here are the basic options.   The $10/month DB server is what I am paying for today.



Lesson 2:  The out-of-box WordPress is not good enough

A default WordPress website created by the Azure wizard is called an out-of-box website.   Based on my experience, the out-of-box WordPress website is down (and gives visitors an 404 error) more than twice every day.  The following dashboard shows the server error frequency on Jun 25 and Jun 26.


In order to improve the stability, you must install the following plugin for WordPress in Azure:

1. Persistent database connection updater

This WordPress plugin automatically updates the MySQL database connection to persistent connection when user update the WordPress version from backend. This plugin is developed to use persistent database connection in Microsoft Azure environment for better performance with clearDB.  It’s a true must-have for WordPress in Azure.

2. WP Super Cache

This plugin generates static html files from your dynamic WordPress blog. After a html file is generated your webserver will serve that file instead of processing the comparatively heavier and more expensive WordPress PHP scripts.  It dramatically reduces the frequency for your website to connect to the ClearDB MySql Database.


Lesson 3:  The cost of a relatively stable WordPress website in Azure is about…

To save cost and maximize the stability, my WordPress website (http://scottge.net) runs in the Basic Tier in Azure with 1 dedicated CPU core + 1.75 GB RAM + 10GB storage.  My ClearDB MySql DB is configured to have up to 1GB storage and 15 connections.

The cost of this relatively stable WordPress website in Azure, with thousands of views every day, is about $56 / month for running the website in Azure + $10 / month for the database in ClearDB.   That’s about $66 per month.

18 thoughts on “3 Lessons from Hosting WordPress blog in Azure

Leave a Reply