Host WordPress on Windows Azure: Host WordPress on Windows Azure

our wordpress live sample website:


 Download sample project here



After doing some preparation in previous 2 articles, we'll host WordPress on Windows Azure in this article.

  • 1. Download WordPress form here. WordPress consumes MySQL as default. For exploiting the power of SQL Azure, WordPress must rewrite the database manipulation interface: wpdb class ,which is quite a big job. Fortunately, we can download the SQL Azure-verison of WordPress from It has done almost everything for you. Extract the package to PHP_WebCgiRole (refer to here ) project.



  • 2. Rename wp-config-sample.php to wp-config.php which is the configuration file of WordPress. Open it, fill the database connection information underlined in red. (refer to here ):


Note: please change the value of DB_TYPE to sqlsrv.

  • 3. Open wp-settings.php, locate at line 147,comment out the code below:


if ( !extension_loaded('mysql') && !file_exists(WP_CONTENT_DIR . '/db.php') )

                  die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ );

  • 4. Open wp-admin/setup-config.php, locate at line 57,comment out the code below:


if ( !extension_loaded('mysql') && !file_exists(ABSPATH . 'wp-content/db.php') )

wp_die( /*WP_I18N_OLD_MYSQL*/'Your PHP installation appears to be missing the MySQL extension which is required by WordPress.'/*/WP_I18N_OLD_MYSQL*/ );

            Above code will check whether the MySQL module is loaded. You can just remove the comment of extension=php_mysql.dll in php.ini to load the MySQL module as a workaround.



  • 5. Open Web.Config, locate at <system.webServer> section, add <httpErrors errorMode ="Detailed"/>.





You can't believe that we are here. Just publish the application and host it on Windows Azure. Visit your application via URL. You will see the setup page of WordPress. Have a nice journey to WordPress !









Chapter 1: Using PHP application in Windows Azure

This article will show how easy to run PHP application inWindows Azure

Chapter 2: Consume SQL Azure Using PHP

This article describes how to access SQL Azure using PHP.

Chapter 3: Host WordPress on Windows Azure

This article describes the process about host WordPress on Windows Azure. Similarly, you will see how easy it will be.

Chapter 4: Using Windows Azure Storage in WordPress

This article introduces the Windows Azure Storage plugin for WordPress . It enables WordPress store multimedia contenton Windows Azure Storage.


Comments (3)

  1. Abdul Jaleel Kavungal Kunnumpurath says:

    All of this is captured in a presentation with screenshots here :…/guide-on-hosting-wordpress-on-windows.html

  2. Database connection error ! says:

    I just checked your wordpress cloud deployed app and it seems that there is a database connection error, not a good idea for me to try this method for production deployment is it??

  3. Luke Canvin says:

    I’ve been trying out WordPress running on the new Windows Azure cloud (it's been seriously overhauled since this article was written) and getting it set up on Azure is so much easier now. I blogged about how to do it:

Skip to main content