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 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"/>.
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 !
This article will show how easy to run PHP application inWindows Azure
This article describes how to access SQL Azure using PHP.
This article describes the process about host WordPress on Windows Azure. Similarly, you will see how easy it will be.