Windows Azure is a very powerful and capable cloud hosting platform. Whether you are looking for highly scalable hosting, huge cloud storage, unshakable SQL Server, or massive CDN and caching, Windows Azure may have an answer for you. Windows Azure supports many open source technologies, including PHP and therefore it also handles WordPress.
Running an application in “The Cloud” is a far different experience than running on a traditional shared or dedicated host, and to tap into some of the features of the platform the Microsoft Interoperability Team has worked hard to deliver open source solutions to the community to enable applications to run faster and more smoothly. Let’s run down a few of the resources currently available.
- 1 Pre-built starter solution
- 2 Windows Azure Helper for WordPress
- 3 WP DB Abstraction
- 4 Windows Azure Storage for WordPress
- 5 Windows Azure Developer Library
- 6 Automated scaling
- 7 Happy developing!
Pre-built starter solution
Update (June 2012): The Windows Azure team has released several new tools that make it much easier to get WordPress running on Windows Azure. In fact it is now a one click solution. The scaffold may eventually go away. Until I find the official post check out this good article by Luke Canvin at http://blog.oxfordcc.co.uk/set-up-wordpress-cloud-windows-azure/
The MS-Interop team has released (on Github!!) a prepackaged solution that will get you a WordPress site fully configured to run on the Windows Azure platform in minutes. From there you can start customizing it with your own plugins and themes, as well as perform any custom development for Windows Azure itself.
Additionally, two very good tutorials can be found on the Azure PHP website for getting WordPress running:
- How to deploy WordPress using the Windows Azure SDK for PHP scaffold
- How to deploy WordPress Mulisite to Windows Azure using the WordPress scaffold
Windows Azure Helper for WordPress
The Windows Azure Helper for WordPress is a very simple plugin that helps site administrators by adding or removing features that users should not have access to changing on a site running in Windows Azure.
The features list on the plugin page list the following (as of publishing this post):
- Hide the Updates menu item under Dashboard
- Hide the Add new plugin menu item under Plugins
- Hide the Permalinks menu item under Settings
WP DB Abstraction
If you want to use SQL Server for any reason, this is the plugin to have. Any WordPress install, whether on Windows Azure or not, can take advantage of existing (maybe corporate) database servers. When hosting in Windows Azure you will be using SQL Azure, which is SQL Server “in the cloud”.
The WP DB Abstraction plugin can be found in the WordPress repository.
Windows Azure Storage for WordPress
If you wish to take advantage of the massive cloud storage available in Windows Azure, or easily add content to the Windows Azure CDN, this plugin will help you do just that. With this plugin you can redirect file uploads to Windows Azure storage completely transparently to the user. A must have if you host on Windows Azure due to the non-shared nature of the cloud instances drives.
The Windows Azure Storage for WordPress plugin can be found in the WordPress repository.
Windows Azure Developer Library
The real meat and potatoes of this post is the Windows Azure Developer Library. This plugin adds the library from the Windows Azure SDK for PHP to WordPress. Upon activation, developers will have access to all the features provided by the Windows Azure SDK for PHP in their plugins. The Microsoft Interoperability team maintains a great list of tutorials on the Azure PHP website to help developers, code examples included.
Be sure to check out the Azure PHP tutorials page for updates as this list may be out of date
- Setup the Windows Azure Development Environment
- Setup the Windows Azure SDK for PHP
- Obtaining the sample files used in the tutorials
- Build and deploy a Windows Azure PHP application
- Using the Windows Azure SDK for PHP
Using the Command Line Tools
Windows Azure Storage
- Enable Remote Desktop
- Diagnostics — Part I
- Diagnostics — Part II
- Scaling PHP Applications
- Accessing Service Configuration Settings from PHP
- Using a custom PHP installation
- Handling sessions with Table storage
- Handling sessions with SQL Azure storage
Deploying to Windows Azure
I hear that there is a plugin in the works (maybe because I am one of the devs ;)) that gives site admins the ability to set various trigger points (CPU, Memory, Network, etc) to have WordPress automagically start up more instances to handle extra traffic, or remove instances when traffic is low to save costs. If you are interested in testing this plugin please let me know.
While not entirely complete, I have decide to toss the code for this plugin up on the plugin repository. Read the note there for more information
Additionally, if you would like to fork the project and contribute code to making it more awesome you may do so on Github. I will merge any changes and put them into the WordPress.org repository for all to enjoy 🙂
You now have all the resources you need to start taking advantage of the resources provided by Windows Azure from within WordPress.
If you have any question or would like help developing your Windows Azure WordPress applications feel free to drop myself or the Microsoft Interoperability team a line.