If you’ve been following along at home, you know we’re setting up a beta testing site for LiveSide running on Azure, mirroring our main site. So far we’ve created a Windows Server 2012 R2 Virtual Machine (in Part One), and set that server up as a web, ftp, and mail server (in Part Two).
Now we’re ready to install WordPress, and for that we’re going to use Microsoft’s free Web Platform Installer. Web PI, as it is sometimes known, will not only install the programs and features you want, but also take care of setting up permissions, and making sure you have everything you need to run the programs it installs.
To get Web PI, you can simply open up IIS and click on your server name (in our case betaliveside), and you should get a pop up window offering to install Web PI.
If for some reason you don’t get the prompt, or aren’t familiar with IIS yet, you can always open IE and navigate to
and install Web PI from there.
In either case, it’s a very small download and only takes a few minutes.
Before we go further, as should be apparent to you once you open up the Web PI, it does a lot more than just install WordPress. There are lots of tools, frameworks, databases and more all available to install via the Web Platform Installer, and it should take care of any of the dependencies you’ll need to get you up and running quickly, whether you’re installing WordPress, or using your server for other tasks. Note that the Web PI may not have the absolute latest product updates available (WordPress, for example, installs as version 3.6 and you’ll need to upgrade to 3.8 once you get all set up), but it’s actively maintained and should be fairly current.
Once Web PI is installed, we’ll just search for WordPress in the search box in the upper right corner:
Click “Install”, and on the next screen Web PI will ask you to choose a database for WordPress. We suggest you just stick with MySQL. Choose a root password, and click continue. Web PI will list out all the programs and dependencies it’s going to install and set up for you:
Agree to the terms and Web PI will begin the installation.
Again, after only about 3 or 4 minutes, the installation will complete and you’ll begin setting up WordPress. For the purposes of this demo, we’re going to install WordPress as the default website, in the localhost root (installing WordPress to /wordpress in the second box, “WordPress application name:” will install WordPress as a subdirectory to the default website, meaning you’ll need to navigate to <site>/wordpress to get to it. In our case, we want to go directly to WordPress in the root):
You’ll get a prompt asking you if it’s ok to overwrite the installation folder, just agree, and in a few seconds IE will open http://localhost with the “famous 5 minute WordPress installation process”. Fill out the info, and click “Install WordPress”.
A few seconds after that, you should be logged in to WordPress!
Now, if you’ve jumped ahead and tried to access the site from outside the server, you’re going to have problems, that is until you make a few changes to WordPress. You need to set a Home and Site URL, which you can do from the Admin Panel in Settings>General, or by opening up wp-config.php in your WordPress installation (which, if you’ve done everything by the book, should be at C:\\inetpub\wwwroot\wp-config.php (you may have to tell Windows to use Notepad to edit the file)), and adding these two lines just before the happy blogging line:
define(‘WP_HOME’,'http://<your azure server name>.cloudapp.net’);
define(‘WP_SITEURL’,'http://<your azure server name>.cloudapp.net’);
/* That’s all, stop editing! Happy blogging. */
(We prefer editing wp-config, as it blocks these two settings from being overwritten from within WordPress, which could be very unfortunate!)
If you have a domain name you want to point at your new installation, of course you can do that, but you can continue to use the xxx.cloudapp.net name if you’re in development. Remember that you’re going to have to jump through some hoops if you’re planning on working on your WordPress site in development and then using it under a different name in production, WordPress doesn’t have a seamless way to make those changes, and it becomes more of a bother if you’ve already added content.
You also have an IP address for your server: you can find it in the Azure Portal, in the Virtual Machine section, in the Dashboard. It’s in the right hand sidebar (the public IP). You’ll need this to set up a DNS Zone if you’re pointing a domain name at the web server.
So now we have a server deployed, set up as a web server, and running WordPress, all up in the cloud, woohoo! While we’re most of the way there, we’re still going to have to tweak our system a bit to get everything really working well. That’s next up in our series.