| Comments

A few days ago, I saw someone posted on Twitter a question about running WordPress on Windows Server.  Since I had done this for a few sites, I responded with my thoughts and tips.  Another suggested that I post those here, and so here I go.

WordPress is a blogging/content-management platform that has been around for a while.  It has been gaining more in popularity for general purpose content sites over the past year I’d say, but is primarily seen as a blogging platform by most.  Even though I use Subtext for my platform, I have to admit that if I hadn’t already started using Subtext, it would be really hard to sway me away from WordPress.  It’s just the killer app for blogging.  Why?  Because of the immense ecosystem of people using it, there is pretty much a plethora of plugins, themes and tools for it.

WordPress is a PHP application and mostly used on Linux environments.  But guess what—PHP has been running on Windows for years.  In fact, our IIS team created a FastCGI implementation for IIS to make PHP applications even run better on Windows.  So here’s how I got started…

Install WordPress

First you obviously need to install the pieces.  I’m assuming here you have access to the actual server.  WordPress requires PHP, MySQL and the WordPress bits themselves.  You can certainly hunt around for those yourself, or you can use the Web Platform Installer from Microsoft and install WordPress on your box in about 15 minutes including download time.  No hunting for the right bits, no tinkering for the right configs.  Just install WebPI, select WordPress and go.  Honestly, this is the best way to get it started on Windows.

After installing you should be up and running with a starting site.  Login to complete the process.

Decide on your permalinks or ‘pretty/clean URLs’

Here’s the main issue with WordPress on Windows.  By default Windows 2003 is still using ISAPI filters to process requests.  What this means is that it needs something to trigger the subsystem it will use to render.  In this case it’s .php for the php files of WordPress – IIS then knows to use PHP to render the files/logic.

However because of this the default pattern of WordPress URLs on Windows 2003 will be <domain>/?page_id=12345.  For everything.  That isn’t very clean or friendly according to the SEO experts. 

Now if you are installing WordPress on Windows 2008 and IIS7 the following does not apply to you.  IIS7 actually has built-in support for this and WordPress current versions recognize IIS7 installs and do the appropriate configuration for you!!!

If you want your URLs to be like <domain>/my-cool-page-title-name then you’ll have to do some hacking.  You can do a ton of high-tech stuff including actual new ISAPI filters to do some URL rewriting.  I chose the low-tech way: 404 handler.  You see if someone requests <domain>/some-page-name IIS won’t be able to find it and will generate a 404 message.  Luckily YOU control that 404 message.  I use a very simple 404 handler that I found online and modified ever-so-slightly.  You can download mine here: wp-404-handler.renametophp.  Simply put this in your WordPress root folder with all the other PHP pages.  Now in IIS Manager you’ll want to configure the IIS site to use your new custom 404 handler. 

WordPress 404 Handler Config

Just click the current one, choose URL and then type /wp-404-handler.php in there and you’re good to go.  Now you can go to the Permalinks section of the WordPress admin and choose “friendly” URLs.  Here’s what I typically use:

WordPress Permalink Config

Now anytime someone requests a friendly URL it will actually hit your 404 handler first, determine the right place and render the content – but keep the friendly URL in tact to the user!

At this point you can close your remote server session – all other routine tasks can be done via the web admin console.

Find Awesome Plugins

Finding plugins is VERY easy in WordPress – it’s in the administrative console of the app:

WordPress Plugin Search

Search for what you want and you can install right from the admin console – no need for FTP and unzip, etc.  Here is a list of my default plug-ins that I install (all of which you can search via your WordPress installation for more details and to directly install):

  • Akismet – comment spam tool
  • All-in-One SEO pack – tools for enhancing your SEO metadata for your posts/pages
  • Contact Form 7 – a typical contact form engine
  • Google XML Sitemaps – an auto generator of sitemap.xml files for search engine indexing
  • Internet Explorer 6 Upgrade warning – you know, to support the death to IE6 cause :-)
  • Really Simple Captcha – for contact forms to prevent robots.
  • WPTouch iPhone Theme – if you want an iPhone friendly theme
  • Silverlight for WordPress – to embed any Silverlight XAP in a post/page
  • Silverlight Media Player for WordPress – uses the Silverlight Media Framework for embedding video or IIS Smooth Streaming content.

There are TONS more, but these are my default that I always put on every site first.  If you want Twitter and other types of integration, they are there…just search for them.  There are currently over 9,500 plugins to choose from…amazing!

Find Awesome Themes

Whatever you do, don’t skip this step.  Don’t keep the default WordPress theme – it’s like any other default user interface thing on any software…it sucks.  Like plugins, there are a plethora of places to get awesome themes.  Here’s my default go-to list:

  • WooThemes – these guys are sweet.  Their menu system is actually going to be a part of WordPress 3.  Most of their themes are premium paid themes, but they do have a few free.  If you want high quality, check out these guys.
  • Themeforest.net – a larger selection of theme from various user-contributed designers and developers.  These aren’t free either, but for < $40 you can have a great quality looking theme.
  • wpsnap.com – these are free themes with community licenses.  There are some gems in here, but most are lower quality compared to the previous two recommendations.
  • WordPress theme gallery – explorable from the WordPress admin page in your installation there are a few in here (some repeats from wpsnap.com).  Usually aren’t the best to be honest.  My favorite for a cleaner default look is Journalist – it’s very basic, but clean looking and professional.

There is no excuse to have a crappy looking WordPress site no matter if you have no money, doing a blog, doing a content-managed site, etc. No excuse.  Spend 30 minutes and find a good template.  Guess what, it installs from the web admin console as well!!!

Author Content

While WordPress uses a web-based interface for authoring content, it isn’t required.  Windows Live Writer understands the WordPress API for both posts and pages and can be used as a rich client tool for authoring content.  It’s awesome together and I use it exclusively to author content for my WordPress sites.

Gotchas for running on Windows 2003

Ok, while I’m sure there are others, I really only found one big gotcha while running WordPress on Windows 2003 (that shouldn’t apply to the IIS7/Windows 2008 installations).  This involves plugins that do form posting.  A good example is a PayPal plugin that is a complete shopping-cart for PayPal (yes it’s in the plugin gallery and free).  Most plugin developers assume your installation is likely Linux.  If this assumption is made, postbacks for some plugins might not work if you use the clean/friendly URL 404 handler I talk about above.

Each plugin is going to be different, but you’ll likely have to modify the post action of that plugin to point more directly to that index.php?page_id=XXXX where your content page is.  I’ve only had to do this twice and It’s relatively painless.  One thing to keep in mind though is that as plugins update (you are alerted in your web console if a new version exists), your changes will likely be overwritten, so document them!

Extend WordPress yourself!

Since I’m a Silverlight guy, I wanted to make sure there were some good Silverlight plugins in the gallery.  The plugin developer process is very PHP driven so if you don’t know that, follow the CASE methodology (Copy Always Steal Everything).  You can learn from others.  I created my WordPress plugins for Silverlight very quickly.

Microsoft is also doing more with WordPress through the MIX labs team.  Check out their information on http://wordpress.visitmix.com for other tips and how, if you want, to run WordPress on SQL Server as well!

Summary

WordPress is awesome.  WordPress on Windows is also awesome.  Windows 2003 takes an additional tweak, but other than that it is very simple to get running and take advantage of this ecosystem.  What other WordPress on Windows tips do you have?

Hope this helps!


| Comments

Are you a startup organization?  Perhaps your the next greatest Silverlight control vendor or have a great app?  I want to help.  If you’re a Silverlight startup (or any startup really for that matter), reach out to me.  If you haven’t heard of BizSpark yet, you’re potentially missing out.

If you meet the following criteria:

  • privately held company
  • in business less than 3 years
  • generate less than USD $1 million in revenue

you may qualify to get access to production licenses for development tools, platform products and server licenses for immediate use.  Take advantage of this and the Web Platform Installer to jumpstart your biz.  Read the details about BizSpark here: How BizSpark Works.

I’m one of the BizSpark Champs and want to help our startups out there – no matter what you are doing – be successful quickly.  Obviously I’d love to see some Silverlight/RIA goodness, so if you’re in that camp, be sure to let me know!  You can reach out to me via my contact information to start a dialogue.

| Comments

Ok I’ve seen all the announcements and read all the buzz.  I know some folks on the team as well and had heard all their raving about their offering.  It wasn’t until today where I really realized what was going on.  In fact I was thinking about titling this post: WordPress installed and configured in under 5 minutes, but it’s much more than just that.

Introducing: Web Platform Installer 2.

The team at Microsoft has been working hard to make getting your web platform (server and client) up and running quickly and taking any pain out of the process.  In one click you can have Visual Studio and Silverlight Tools installed, IIS7 configured, Smooth Streaming enabled, etc.

But it’s much more than just that.  You see the team partnered with the community and popular Open Source projects to provide much more than just Microsoft offerings.  Earlier today I wanted to check out WordPress templates in more detail and wanted them on my own server.  Let me set the stage for you.  My server is Windows 2003, IIS6, and has no SQL Server installed.  That’s it…a bare web vanilla front end.  I fired up WebPI (as it is affectionately known) and look what you see:

Web Platform Installer Applications

That’s right, WordPress as an offering.  No, not some hacked “run as .NET” version of WordPress.  The real deal from the WordPress project site…Microsoft hosts nothing but a simple manifest describing the project.  I selected WordPress and the tool knew what was missing from my environment: MySQL, PHP, FastCGI, etc. 

WordPress Install dependencies

I clicked “install” and literally in about less than 10 minutes I was running WordPress.  I’m not saying “installed” or downloaded.  In fact most of the time of that 10 minutes was from downloading the various bits.  When the “You’re finished” message came up, I had a working WordPress site, configured to MySQL, configured with a content database, etc.  I had to do nothing to configure my MySQL settings, I had to do nothing to my get PHP running on my site…WebPI did it all for me.  It was totally friction free.

It’s not just WordPress either.  Drupal, Umbraco, DasBlog, Subtext, ScrewTurn Wiki, etc.  And you can put your app there as well.  It really is a great resource not only for server components but also for client web platform stuff like I mentioned previously for Visual Studio and Silverlight developer tools.

Great job to this team and you all should definitely check it out.  They really did a good job.  My server didn’t get screwed up at all and everything “just worked.”  I think this installs WordPress faster than WordPress instructions! :-)

| Comments

I’m sure you’ve heard of the IIS7 Smooth Streaming information and perhaps even experienced it if you watched some of the NBC Olympics streams last year or the Presidential Inauguration this past January.  It’s a great experience for online media being able to seamlessly deliver quality media online without constant buffering when latency occurs in networks you don’t control, such as your customers’ ISP accounts.

You may have wanted to try out this experience yourself to see exactly what it does and how it works…as well as to simulate bad/good bandwidth.  Well, you can.  Here’s what you do:

  1. Ensure you have an IIS7 environment
  2. Download and install the Web Platform Installer which is an easy way to pick the package and have it (and any dependencies) installed for you
  3. Download the sample content (Big Buck Bunny – an digital cartoon rendered in various bitrates to simulate the experience).
  4. Download the UX Simulator player starter kit (this is the player shown below to simulate the experience)

Once you have all that installed and working, the sample content also installs a UX Simulator application which is a Silverlight application that uses one of the Expression Encoder player templates and also adds some nice features to simulate latent/changing network bandwidth speeds. 

NOTE: If you don’t have access to a server and want to try out this simulator yourself you can visit http://www.iis.net/media to see it live.

Here’s a screenshot of my session running.  The graph below shows what bitrate is being delivered.  Notice the marks where I indicate where I was seeking the media.  It drops down to that the user doesn’t get the dreaded buffering pause, but still continues immediately and then scales back to the highest quality media it can deliver.  The slider on the top right allow you to simulate a drop/increase in available bandwidth:

Smooth Streaming UX Simulator

Try this out if you are interested.  It’s a very high quality sample content, but you can also try out the UX Simulator on your own content if you use Expression Encoder and choose the adaptive profile to generate the Smooth Streaming files.  Watching the content via this simulator is a very cool experience to see it happen as it really does seamlessly change bitrates without impact to the user and without using a new stream.