Windows Azure Technical Forum Support Team Blog

Blog hosted by Microsoft Windows Azure Tech Forum Support Team, provides tech support of Windows Azure, SQL Azure, Appfabric…

Host Wordpress on Windows Azure: Host Wordpress on Windows Azure

Host Wordpress on Windows Azure: Host Wordpress on Windows Azure

  • Comments 3

our wordpress live sample website:

http://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 http://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:

http://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.

 

Leave a Comment
  • Please add 4 and 1 and type the answer here:
  • Post
  • All of this is captured in a presentation with screenshots here : cloudgeist.blogspot.com/.../guide-on-hosting-wordpress-on-windows.html

  • 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??

  • 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: blog.oxfordcc.co.uk/set-up-wordpress-cloud-windows-azure

Page 1 of 1 (3 items)