Deploying a PHP App to the Cloud: WordPress


WordPress on Windows Azure

Your journey to the Cloud started with a walkthrough of deploying a simple PHP app to the Cloud. Now, we’ll continue with exploring how to deploy a more complicated but much more useful application to Windows Azure.

WordPress and Windows Azure go very well together and deploying WordPress to Windows Azure is not much more complicated than the simple “Hello Cloud!” PHP app from the previous walkthrough as you’ll see in this walkthrough.

There are two different approaches to deploying WordPress to Windows Azure. The first is a manual approach where you’ll prepare the PHP environment, build the package in Visual Studio, and then deploy it to Windows Azure through the Windows Azure Management Portal.

The second approach is a more automated installation by using a the Windows Azure Companion. The Windows Azure Companion is a ready-made administrative web site that you run on your account in Azure. The site allows you to install frameworks, like PHP, and other 3rd party applications, like WordPress, Drupal and Joomla!, directly into the same Azure service instance hosting the Companion (a worker role, by the way) If this kind of thing sounds familiar, well it is; think of the Windows Azure Companion as the cloud analogy of the Web Platform Installer.

You may be aware that you can already host PHP, MySQL, Java, and a host of other non-Microsoft frameworks and applications on Windows Azure, and there are a number of solution accelerators (PHP/MySQL, Tomcat, memcached, etc.) available to help you out. The Windows Azure Companion takes things to the next level, providing a single point of administration for hosting and managing frameworks and applications in Windows Azure. Right now it’s focused on PHP-based applications, given the popularity of CMSes like WordPress and Drupal, but it certainly seems like a platform that could be easily extended in the future.

Let’s get started.

Before proceeding, you’ll need to make sure that you have a Windows Azure account. Between now and June 30, 2011, take advantage of this free trial offer that provides you with sufficient resources to run an entire single instance web site, 24 hours a day, for an entire month. Visit Canadian MVP Colin Melia’s blog for instructions on creating your Windows Azure account. 

Don’t have a credit card, no problem. As a special offer through our blog, you can sign up for a Windows Azure Pass at Select Canada as the country and CDNDEVS as the promo code.

To deploy WordPress to Windows Azure

  1. In part 1, you’ll go through the basic process of hosting PHP applications on Windows Azure, which includes creating the deployment package and configuring the PHP CGI Web Role.

    You don’t have to follow the last steps of this part where you’re instructed to visit the Windows Azure Management Portal and deploy the sample app.

  2. Now that you know how to create a deployment package, in the next part, you’ll add the WordPress installation to the package. You’ll then make the necessary configuration changes and deploy the final package to Windows Azure via the Windows Azure Management Portal.

If you don’t have Visual Studio, or prefer to work without it, you can also prepare the deployment package using the Windows Azure Command Line Tools for PHP. Use the Deploying a Simple PHP Cloud App walkthrough to learn more about the command line tools. Alternatively, you can use the Windows Azure Companion with the instructions below.

To deploy WordPress by using the Windows Azure Companion

Jim O’Neil, a fellow developer evangelist, walks you through the installation of the Windows Azure Companion, followed by the installation and activation of WordPress in his blog post Windows Azure Companion: PHP and WordPress in Azure.

As I mentioned in our first walkthrough, if at any time during your walkthrough you have any questions or are having trouble, feel free to send me an email ( I’ll be more than happy to help.

Please take a moment to share what you thought of the walkthrough, what you’ve learned, and what next steps you’ll take on your journey to the Cloud in this LinkedIn Cloud Development group discussion. I’ll be reading through your responses and taking your feedback as input for future walkthroughs and events.

Skip to main content