Moving a WordPress Blog to Windows Azure – Part 1: Creating a WordPress Blog on Windows Azure
As an MSDN Subscriber, I have some great benefits on Windows Azure at my disposal. One of which is a credit of up to $150/month to use at my discretion for any Windows Azure service. With the recently announced general availability of Azure WebSites at the recent Build 2013 conference, I am choosing to take advantage of my MSDN Azure benefits and move this very blog over to Windows Azure Web Sites.
Currently my blog is hosted on IIS (Internet Information Server) running WordPress as my blog engine. I switched from .TEXT (dotText) (an ASP.NET based blog engine that has spawn several forks including SubText and BlogEngine.NET along with many others) to WordPress a few years ago for an opportunity to dabble in the PHP world and learn a thing or two. As it turns out, my PHP friends tell me that if you want to learn PHP, stay away from WordPress. :) Anyhow, WordPress is used to serve up millions of websites across the world and has an outstanding support community behind it. I’m not ready to switch off of WordPress just yet. Let’s focus on switching service providers first before I start thinking about switching blog engines.
There are probably several different ways to move your WordPress blog over to Azure. There are several steps involved, with various nail-biting instances in play. However, it turned out to be easier than I thought it would be and I was up and running in less than an hour!
Let’s get started!
Creating a WordPress Blog on Windows Azure
To create a WordPress blog on Windows Azure, it really couldn’t be simpler. I’m assuming you’ve already signed up with Windows Azure. If you’re an MSDN Subscriber, be sure to activate your Windows Azure Benefits. If you’re coming to Windows Azure for the first time, you can sign up for a free 1-month trial with a $200 credit towards any Azure Service as part of your trial.
Once you’re all signed up, sign into your Windows Azure account and go to your Portal. In the Portal, click the ‘+’ sign on the taskbar to bring up the task menu.
In the task menu, Select Compute | Web Site | From Gallery. There are many apps ready to be deployed to your new Azure web site including app frameworks, forum software, content management systems, as well as several blog engines. Seeing as how we’re moving an existing WordPress blog over to Azure, we’re going to select ‘WordPress’. Once selected, click on the next (“Right Arrow”) button to set up site configuration.
Windows Azure provides you the opportunity to create up-to 10 free websites. These websites are hosted under the ‘azurewebsites.net’ domain. You can host your website under a custom domain once you upgrade your website to the Shared or Standard mode service tiers. There is a cost associated with these service tiers. MSDN Subscribers and BizSpark members receive a nice discount for the various Azure services. Even without the discount, we’re still far below our monthly Azure credit as an MSDN Subscriber!
On the Site Settings page, enter a URL to host your new WordPress website. This name must be unique under the ‘azurewebsites.com’ domain. Think of this as your staging area for your new WordPress site. Once we get everything up and running, we’ll switch out site over to a Shared hosting plan and configure our custom domain. A WordPress site requires a MySQL database. If you don’t have a MySQL database already configured, this setup process will create one for you. From there, select the Region in which would like your site to be hosted from. Once finished, click the next button.
On the “New MySQL Database” settings page, specify a name for your MySQL database and select the Region where the database should be hosted. Ideally you’ll want your website and database to be hosted within the same region to cut down on any latency between your website and the backend database. Read the terms for ClearDB (the hosting provider of your MySQL database) and if you agree, check the box and complete the setup process by clicking on the check button.
Once you click on the Check button, you will be returned to the Web sites Portal page where you should see an entry for your newly created website. The Status indicator will briefly display “Creating” while the new site is provisioned and the WordPress software is installed for you. When everything is complete, the status will change to “Running”.
In the Website Portal page, click on the website name to open the site’s dashboard page. Initially you’ll see a quick-start page outlining some options to help you get started. Feel free to skip those options for now and click on the “DASHBOARD” link at the top of the page.
The Dashboard page provides an overview of your websites usage along with configuration items and the locations of some important links such as your FTP host, where you can upload files to your website, and the FTP Diagnostic logs, where you can download the log files of your website.
Click on the link under SITE URL (ie. http://yoursite.azurewebsites.net) to test your new website.
If you see the WordPress installation page, CONGRATULATIONS! You’re up and running with WordPress on Windows Azure!
Finish the WordPress installation by filling out the required details and clicking the “Install WordPress” button.
That’s it! A fully functional WordPress site on Windows Azure!
Next, we’ll cover how to import your existing WordPress content, move over your additional content such as your theme and plug-ins, a couple of server tweaks and wrap everything up with a nice custom domain.