Home > Make Wordpress Do What You Want > Fixing 404 Error When Using Wordpress Pretty Permalinks with WAMP

Fixing 404 Error When Using Wordpress Pretty Permalinks with WAMP

Problem

When you’re developing locally for a client, you want to try and replicate the server environment as closely as possible. That’s why using tools like WAMP are so great because they provide you with a pretty much stock version of a typical server setup that will work for 99% of use cases when it comes to developing and deploying a Wordpress site. But sometimes, things break. And when they break, they don’t make sense.

A perfect example is using a default install of WAMP and trying to setup “Pretty Permalinks” with Wordpress. An example of pretty permalinks is setting your permalinks to /%postname%/ instead of the standard www.domain.com/p?=23. Obviously a favorable setup for SEO and usability.

But if you were to set the permalinks to that with a default WAMP install, your site will start throwing up 404 pages for all pages that are linked to with the new permalinks. The problem is that mod_rewrite is not turned on by default with WAMP, so Apache is incapable of rewriting URLs according to .htaccess rules that Wordpress sets when you modify your permalinks.

Solution

rewrite-module-screenshot

Click to Enlarge

In your taskbar in the bottom right of the screen in windows, left click the WAMP icon, go to Apache, then Apache Modules, then make sure that “rewrite_module” is checked. Checking that will automatically restart WAMP and will activate mod_rewrite, allowing you to modify your permalinks however you want while not breaking anything!

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Design Float
  • Reddit
  • Technorati
  • StumbleUpon

Related posts:

  1. Generate Link to Wordpress Home Page with the bloginfo Function
  2. Automatically Generate and Submit an XML Sitemap with Every Wordpress Post
  3. How to Exclude Pages from Your Wordpress Navigation Menu

  1. Antonio
    September 22nd, 2009 at 05:29 | #1

    FINALLY…You can’t know for HOW LONG I have been looking for some information like this one…I feel like I want to cry! Honestly…thanks for this info.

    Antonio

    Reply to this person's comment

  2. eddie
    September 23rd, 2009 at 09:21 | #2

    You are the MAN!!!!! now works for me to! :)

    Reply to this person's comment

  1. No trackbacks yet.