Moving Wordpress from Apache to IIS

Here are the full details of how I moved my blog from the Kiwihosting Unix servers to Windows, skipping all the missteps, so it’s more of a how I would redo it.

I was running 2.2.3 (as that was the latest version I could get working on the older server ) and I have WordPress located in the directory \blog on my domain.

  1. Download the full old site via FTP to local dir c:\temp\old

  2. Export Wordpress contents (in 2.2.3 Manage > Export) to (wordpress..xml)

  3. Check-out the current SVN WordPress trunk to c:\temp\wp-trunk
    note: I was having errors with release 2.6.3, so had to try 2.7-beta3

  4. Export trunk (c:\temp\wp-trunk) to c:\temp\wp27

  5. Copy c:\temp\oldroot to c:\temp\newroot

  6. Replace the *c:\temp\newroot\blog* directory with **c:\temp**wp27 contents

  7. Copy the Uploads *c:\temp\oldroot\blog\wp-content\uploads* to *c:\temp\newroot\blog\wp-content\uploads*

  8. Make a copy of the default theme, I did this just to simplify merging changes from SVN with my own changes.
    note: Change the header comment in c:\temp\newroot\blog\wp-content\themes\\style.css so you can tell the difference between your new theme and the default.

  9. Created domain in Helm

  10. Install the Propagation Support (Home > Domain > simeonpilgrim.com > Application Packs) to access site via a temporary URL

  11. Create DB, via Helm

  12. Create DB Users account, after step 11 you see the details on the connection string (with dummy values), notice that the box below has an Add User button, use that

  13. Configure wp-config.php to point to DB
    note: my database is on a non-standard port, so for the DB_HOST I added a port suffix so it looks like ‘server.name.com:3306’

  14. Create FTP User account

  15. Upload full site (*c:\temp\newroot*) to new server

  16. Install WordPress
    note: use the temporary URL as the WordPress address (URL) otherwise you will keep getting redirected to your old (and live) server. If you make this mistake you can log into myPhpAdmin (near bottom of left side bar) to edit the DB directly.

  17. Import WordPress contents wordpress..xml via Tools > Import

  18. Install Plugins

*   [WP-Mail-SMTP](http://www.callum-macdonald.com/code/wp-mail-smtp/) \- This is very important, as it allows WordPress to send email
    For kiwihost you just need to set **SMTP Host** to "localhost" and **Authentication** to "No: Do not use SMTP authentication."

*   [Google XML Sitemaps](http://www.arnebrachhold.de/redir/sitemap-home/ "Visit plugin homepage")

*   [Google Analytics for WordPress](http://yoast.com/wordpress/analytics/ "Visit plugin homepage")

*   [FD Feedburner Plugin](http://flagrantdisregard.com/feedburner/ "Visit plugin homepage")
  1. Fix Category slugs, any special character symbols get dropped when you import your old content, so for me the slugs for C# and C++ both became C, so I had to reassign the posts using those Categories

  2. Change permalink format and turn on URL rewriting so it works

  3. Change over DNS nameservers

  4. If you have the site perfect, change the URL (Settings > General > WordPress address (URL)), otherwise do this after the next step

  5. Wait a few days for DNS to roll-over

  6. Remove the Propagation Support from step 10

  7. Decommission old server and get 6 months free hosting for being so clever

Permalinks fixed

So after sleeping I did the following:

  • Read the help pages for Helicon Tech ISAPI_Rewrite v3

  • Turned the plugin on
    In Helm: Home > Domains > simeonpilgrim.com > Website Extensions > URL Rewriting

  • Wrote my rewrite correctly

      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule .* /blog/index.php [NC,L]
      <blank line>
    
  • Changed my WordPress permalinks to custom

      /%year%/%monthnum%/%day%/%postname%/
    

Permalinks currently broken

Current issue with moving from Apache to IIS is the rewrite tools are not a 100% replacement.

Therefore my permalinks now have an ugly index.php in them, which I can’t seem to get rid of.

The examples on the product page are crap, because it’s not the same as my old URL, and all my inbound URLs from Google etc are 404ing.

So I’m not really that impressed.

Microsoft UNPLUGGED - WPF & VS2008

I attended the November Unplugged WPF & VS2008 developer session on Tuesday.

JD’s talk was well balanced, and covered the basics of what WPF is, how the UI and UX work.  He avoided only showing the shiny demo screens and dug deeper into Command and RoutedEvents and how the UI and UX are decoupled.

WPF is so big, and a bit of a mind shift from VB6 drag and drop that I’m not sure there is much more that can be demoed to a general audience.

Kirk’s Visual Studio 2008 talk was fantastic.  Lots of keyboard short-cuts for tasks I’m currently doing via the  mouse, so I’m very pleased to learn the key combo’s.

I’m torn between Crtl + . and F8 being my absolute take-away gems, both will be used heavily.  Nice to see a talk about using the tools better.

There were some good give-away’s, an office 2007 license, a wireless mouse and a 22” wide screen panel.  Of which I didn’t win any.

This has made me more keen to port CotAB to Silverlight, just for the experience of it.

Before the event I attended a MS feedback discussion group.  So funny to see who of the .Net CHCH scene turned-up.  It was good to talk about issues, impressions, and opinions.  I hope Microsoft guys got the value they were hoping to get.

Curse of the Azure Bonds - build 1.0.14

A new version of the game is now available: build 1.0.14

This build, from a user’s perspective only adds a new cheat: to remove the race based level limits, that was requested by Pope.

I have been feeling bad about the status of the port recently.

Behind the scenes  I have been renaming and cleaning-up the code.  I have also started getting the project to build under mono, so it could be played on Linux or Mac OS X (the primary target of the two).

I’m torn between making it a stand-alone application, that looks native (as it presently is, but cross platform), or using Silverlight 2.0 and keeping it single targeted.

CodeCamp: Delegates

Wow, I’m sitting here in a C# 3.0 - A Whirlwind Tour talk, and the group has stalled on Delegates, a .Net 1.0 feature. Anonymous Delegates lost more people, Lambda functions are now messing with peoples heads….

Eeek, this is all 101 stuff, people!

It’s almost like nobody gets C function pointers or C++ functors.