DrewGreen.net: Now running on IIS 7.5

For the past few years I’ve been running a few websites on a Ubuntu server running a LAMP (Linux Apache MySQL PHP) configuration.  I’ve been running an application called EHCP (Easy Hosting Control Panel) which is a simplistic web control panel to host multiple sites in a reseller environment.  I was using it for the sole purpose of easily hosting multiple sites on the same web server (as I’m not very well versed with Apache).  It served it’s purpose for a while, but a number of quirks made me want to find a better solution.  I was interested in possibly switching to a Windows-based solution, as that’s what I’m most experienced with, but was unsure of exactly what to do.  Do I load Apache on Windows or should I try IIS?

I’ve got a virtual server running Hyper-V R2 and a VHD template of Server 2008 R2 Enterprise, so I figured I’d give IIS 7.5 a shot.  To my surprise, Microsoft has established something called the Web Platform Installer (Web PI), which as it suggests, installs a number of web applications automatically.  I visited their site and found that WordPress was one of the web platforms offered.  I downloaded the Web PI and selected the WordPress option.  This great tool even went so far as to install the necessary IIS role components (as IIS wasn’t even installed yet), install the latest version of PHP, install MySQL, and then install WordPress.  It then brought me through a quick wizard to establish my WP database, db user, etc.  Within a few minutes I had a WP blog setup on IIS 7.5.

This was so incredibly simple, I couldn’t believe it.  I’m fairly impressed overall with IIS 7.5, as it seems fairly easy enough to use.  This is the first real site I’m running on IIS, and compared to Apache, it seems much more user friendly.  This being the case, I decided I would migrate my other sites over to the new server.  The other sites included another WP blog, a fairly basic site written in PHP, and a web page that redirects me to my Outlook Web App site.  Migration was as simple as drag and drop, for the most part. I created the new sites in IIS, set the bindings (mapping hostnames to each site), I copied my files from the old site to the new IIS directories, and then had to do a quick database export and import to transfer my MySQL data to the new server.  Luckily I set the db credentials to the same on the new server as I did on the old one.  If any changes were needed, they can be modified in WP-config.php.

The one thing I can suggest is that when running through the Web PI, you should set the WP database name to something other than just “wordpress”, as this can cause some issues (as I found out) if you want to add another WordPress blog, since the default db name (that I happened to use for both blogs) was “wordpress”.  I didn’t think much about this at first since I didn’t plan on migrating my old blog to the new platform initially.  When I decided to do this, however, I now had to either have one “wordpress” db and another db named something else (and then change the WP settings in wp-config.php) or change the name of the “wordpress” db to something a litte less generic.  I opted to rename both databases to something descriptive.  The problem is that you can”t simply rename a database.  To do this, I exported the db, created a new db with the name I wanted, then imported into the new db.  I then assigned the wordpress db user account the necessary permissions to the new database.  Then, after pointing wp-config.php to the correct db, I deleted the old “wordpress” db.  When I moved the blog from the old server to the new one, I was able to essentially do the same process, except I created a new db on the new server and then imported the exported tables from the old server’s WP database.

Overall, I’d say this was was a very easy project if you’ve got moderate web server knowledge.  The database rename was the most time consuming part, simply because I spent time looking for a feature (rename) that doesn’t exist.  I’d recommend IIS 7.5 to anyone that is interested in an easy to use web server.  If you’re a student, you can obtain a copy of 2008 (maybe even R2 now) Standard for free from the Microsoft DreamSpark program.

Leave a Comment

Your email address will not be published. Required fields are marked *