WordPress on IIS 7.x 404 Error

There can be many reasons  a 404 error is generated when combining Windows, IIS, PHP,  and WordPress.

Many of you/us out there use our Windows machines exclusively for a variety of reasons ( most often because gaming is where it’s at on Windows and consoles are for the strange).

Because of this, we also develop on these machines for many other stacks, including LAMP.

Cutting it short: if you’re a professional, I would highly recommend spending the money on Helicon Ape. It plugs into IIS and gives you most of the cross functionality you’re looking for between Apache and IIS, making it easy to move your Windows developed WordPress site onto your client’s (most likely) LAMP based hosting.

Before you drive yourself crazy, however, do this:

  1. Go into you WP Admin and make sure you’ve hit save on
    • Settings > General > make sure your site URLs are correct > hit Save
    • Settings > Permalinks page > confirm everything is correct, hit Save
    • Yes, this sometimes works. No, I don’t know why.
    • Refresh your site. Still got a 404? Proceed…
  2. Do NOT mess with anything else in WordPress or your code or IIS. Just don’t.
  3. Get Helicon Ape and install it (it’s free for 45 days)
  4. In your site root, create an .htaccess file and put this code into it:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
  5. Refresh your site
  6. Modify where necessary

You can’t create an .htaccess file by creating a text file and re-naming it?

  1. Create new notepad file
  2. Paste code into it
  3. Save As > Select “All Files (*.*)” instead of “Text Documents (*.txt)
  4. Make sure it is in the root of your WP site
  5. Refresh you site
  6. Delete the notepad txt file (if you created one)

Any other great suggestions? Leave a comment below.

Add a Comment

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.