WordPress 404 errors on all pages except home

Zach Russell asked:

I’m having a really unique issue with a local development environment. I currently have a WAMP Stack Running on ZendServer. On my computer, by default, port 80 is occupied, so I am using port 8080, and I’m having no issues with this whatsoever.

This issue first came to my attention when I started with a local WordPress install, and I can view the homepage and access the backend of WordPress with no issues. I can add/edit posts with no issues. I originally set up a vhost to have zr‑www.mywebsite.com:8080 to map into my htdocs folder and that works with no issues.

What then happens is that I go on the home page, then try to go to any page other than the home page (on the front end), and I get a 404 Not Found error. It is an exact clone of the live site, and when I test it on a linux-based LAMP Stack (Ubuntu) it works with no issues.

Any clarification on this would be greatly appreciated.

My answer:

You forgot your WordPress rewrite rules. Make sure you enabled mod_rewrite and have the appropriate bits in .htaccess.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.