Getting The XML Sitemap Generator for WordPress Working on Windows

This blog is running using WordPress on Windows hosting (Windows 2008 & IIS7) on a shared hosting platform.  The control panel is Plesk.  The WordPress application was installed from the control panel rather than the usual manual installation.

For SEO reasons you need a sitemap.xml file to tell search engine crawlers about your site and it’s content.  There is a very handy Google (XML) Sitemaps Generator for WordPress.  I installed it when I set up the blog last month but I kept getting errors that it could not create neither the sitemap.xml nor the sitemap.xml.gz files.  When I tried manual executions of the build process then the page would fail to load.  I did a tonne of searching and found two solutions:

  1. You have to create 2 empty files in the root folder of your WordPress site for each of the files.  The generator will not create these files, only edit existing files.  Empty notepad files will do on Windows.  Linux folks can “touch” them.
  2. The next thing was permissions.  This is where it became obvious to me that most WordPress folks are on Linux hosting.  The advice was to use chmod or FTP to set the permissions to 777, i.e. all rights to all users, on the two files.

I’d done the first step.  The control panel doesn’t allow us to modify permissions on CP installed application files/folders.  I also couldn’t set the 777 rights via an FTP tool for this reason.  I viewed the permissions and donned my traditional least privileges approach.  The website runs using the application pool identity.  So if I grant that account write permissions on the files all should be OK.  Turns out that wasn’t true.  The plug-in was running as something else. 

I was unwilling to test more on my production site so I set up a dummy site and did a manual install of WordPress and the plug-in.  Now I had rights to set permissions.  I granted write permissions to web users (the only remaining group in the control panel).  Now I ran the job manually.  It worked!

I got the hoster helpdesk to set the permissions on the two files on this production site.  I re-ran the job manually.  Now it worked and my sitemap was created.  Excellent.  I’d been doing some other SEO stuff to bring search engines here and it has been starting to work.  But the sitemap should help greatly.

Technorati Tags:

One thought on “Getting The XML Sitemap Generator for WordPress Working on Windows”

  1. I’ve also gotten this to work by uploading a text file called ‘sitemap.xml’, and than giving full read / write permissions through the control panel to this file (using Plesk as the Control Panel).

    Ideally you could probably do the same thing with the sitemap.xml.gz file too.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.