WordPress 2.51 and IIS error – Notice: Undefined index: REQUEST_URI in \wp-settings.php on line 81

The original wordpress 2.5 error mentioned in the last post was fixed in the 2.51 release but there is an additional error that crops up. If you are getting an error similiar to the follwing:

Notice: Undefined index: REQUEST_URI in F:\Domains\mydomain.com\wwwroot\wp-settings.php on line 81

To solve this issue you need to edit the wp-settings.php file.  After line 79 or ”// Append the query string if it exists and isn’t null” add the following line:
  $_SERVER['REQUEST_URI'] = substr($_SERVER['PHP_SELF'],0);

This error is due to IIS not recognizing ‘REQUEST_URI’

If you don’t want to make the modification yourself you can download the modified wp-setting.php file from here.


  1. Thanks. I didn’t think the error was causing me any problems. It was just annoying. Your suggestion fixed the problem.


  2. Thank You so much – this solved the problem. Great Information

  3. Thanks a million! Those errors were driving me nuts.

  4. Worked for me as well (hosted by Brinkster). Thanks for posting the solution.

  5. Ed Lewis says:

    Thanks so much! Is this posted on wordpress.org? It was not an easy fix to locate.

  6. I am happy to help – I have posted this solution to a couple of questions in the wordpress forums.

  7. Philip Coke says:


  8. thanks a lot!

  9. Perry Preet says:

    Well, i just solved the problem by dropping by with this article. Your sharing helped me a lot. Thanks for that.

Speak Your Mind