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:
- 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…
- Do NOT mess with anything else in WordPress or your code or IIS. Just don’t.
- Get Helicon Ape and install it (it’s free for 45 days)
- 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 - Refresh your site
- Modify where necessary
You can’t create an .htaccess file by creating a text file and re-naming it?
- Create new notepad file
- Paste code into it
- Save As > Select “All Files (*.*)” instead of “Text Documents (*.txt)
- Make sure it is in the root of your WP site
- Refresh you site
- Delete the notepad txt file (if you created one)
Any other great suggestions? Leave a comment below.