Installing WordPress on IIS7 – Part 2
Pluralsight blog Where devs, IT admins & creative pros go for news, tips, videos and more.
3,500+ tech & creative courses authored by experts - unlimited & online Get it now →
October 9, 2008

Installing WordPress on IIS7 – Part 2

By

Now that we’ve installed and setup a WordPress blog on IIS 7 let’s get into the details and enhance it a bit.

First we’ll set up search engine friendly URLs for our WordPress on IIS 7 to increase SEO. Then we’ll learn how to take advantage of the many WordPress plugins. And finally I’ll talk about setting up IIS Authentication for our WordPress site.

If you missed it, here’s Part 1 of Installing WordPress on IIS 7.

Search Engine Friendly URLs for WordPress on IIS7

Now if you’re interested in getting free and highly targeted traffic to your website, you can’t do much better than the search engines. As of this writing most search engines put a good deal of weight on having friendly URLs that include what the page is about.

For example, in our current install if you click on the default post you will notice that the url is:

http://domainname/?p=1

This doesn’t really tell the search engines anything about the page so they will not use it in their ranking weight. Now what if this was changed to something like:

http://domainname/hello-world

The search engines would accord more ranking weight for the keywords “Hello World” that are in the url. This is the reason I had you install the URL Rewrite module, because there is a little code you can include to help make the URLs friendly to both search engines and users.

1. Browse to the directory you have installed WordPress in and create/open the web.config file in Notepad.

Installing WordPress on IIS 7 - 1

2. Now navigate to the <System.Webserver> element and copy the code below into it and save it.

<rewrite>
<rules>
<rule name=”Main Rule” stopProcessing=”true”>
<match url=”.*” />
<conditions logicalGrouping=”MatchAll”>
<add input=”{REQUEST_FILENAME}” matchType=”IsFile” negate=”true” />
<add input=”{REQUEST_FILENAME}” matchType=”IsDirectory” negate=”true” />
</conditions>
<action type=”Rewrite” url=”index.php” />
</rule>
</rules>
</rewrite>

NOTE: Your web.config file might look very different from mine due to any other options that are installed on your server. The main thing is, if you already have a <rewrite> section then place the rules within that, if you don’t then just put in the whole section below anywhere between <System.Webserver> </System.Webserver>

Installing WordPress on IIS 7 - 2

3. Now in your WordPress dashboard go ahead and click on Settings in the top right

Installing WordPress on IIS 7 - 3

4. Now click Permalinks across the middle of the screen

Installing WordPress on IIS 7 - 4

5. Under Common Settings go down to Custom Structure and place the following in the text field:

/%postname%/

If you want to put other variables into the url structure you can find a full list at:

http://codex.wordpress.org/Using_Permalinks under Structure Tags

After you configure your structure click on Save Changes.

Installing WordPress on IIS 7 - 5

6. Now let’s go back to our site home page and click on the default post, you will now see that the url is now http://domainname.com/hello-world/

Installing WordPress on IIS 7 - 6

That’s it, using this will almost certainly increase your search engine visibility along with making your post URLs easier to remember for average users.

WordPress Plugins

One of the best things about WordPress and why it has become so popular is that it allows for great flexibility by allowing the use of plugins. Plugins are at the heart of WordPress’s extensibility because they are for the most part written by the user community. This means that when someone needs some kind of functionality more than likely someone else has needed it and written a plug-in for it.

While I cannot cover all the plugins out there, let me mention some tips if you have any problems with using them on your site. If you try a plugin and have issues take a quick look at the following:

  • PHP extension needed – if you kept your PHP installation lean you might not have all the extensions needed and configured. Make sure that you review the requirements for the plug-in and you have the extension loaded.
  • File permissions – watch the permissions in the directory that the plug-in is installed.

Here’s where you can learn more about plugins: http://codex.wordpress.org/Plugins

And here’s where you can search the 3,000+ WordPress plugins: http://wordpress.org/extend/plugins/

IIS Authentication for WordPress

WordPress uses its own users and rights system, but there might be a situation where you want to use IIS authentication instead to seamlessly integrating the WordPress blog with the rest of a site. While this is very site specific and I will not go into detail here on how to do it, Mike Volodarsky has a great write-up on it using a plug-in that he wrote.

You can find that information on his site: IIS 7.0 Server-Side.

Summary

You have now installed and configured WordPress on IIS7 and even changed the URL structure to a custom one that will help you grow your blog through increased search engine traffic. Now go look through some plugins and start adding content to your site!

Ready to test your skills in WordPress? See how they stack up with this assessment from Smarterer, the newest addition to the Pluralsight family. Start this WordPress test now

About the Author

(MCTS, MCP, A+) has been working in the IT field since leaving the U.S. Army in 1996.  Working his way up from printer hardware repair to running a corporate datacenter for a multinational corporation, Dave has seen many environments throughout the years. Focusing on web sites and search engine optimization the last few years, with the release of Server 2008 it has renewed his passion for the Wintel platform and server technologies. David also runs Windows-Server-Training.com where he posts free videos and walk-throughs for a variety of server technologies. David currently works as a freelance technical consultant and writer for a variety of companies in the Chicago area.

Author's Website: http://www.DaveLawlor.com


Discussion