Host Wordpress on Windows Azure: Host Wordpress on Windows Azure

our wordpress live sample website:

https://wordpress-win-azure.cloudapp.net/

 

 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 https://wordpress.visitmix.com/. 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"/>.

 

 

Verification:

 

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 !

 

 

References:

https://wordpress.visitmix.com/

 

 

 

Topic

Description

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

  • Anonymous
    April 16, 2011
    All of this is captured in a presentation with screenshots here : cloudgeist.blogspot.com/.../guide-on-hosting-wordpress-on-windows.html

  • Anonymous
    July 22, 2011
    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??

  • Anonymous
    June 11, 2012
    The comment has been removed