Business Intelligence and DataWarehousing Concepts

Business Intelligence and DataWarehousing Concepts

Business, Economics and Money Making

Articles relating to business, economics, and all about money matters

Computer Tips & Tricks

all about the coolest tricks and tips on computers

IBM DB2, Lotus Notes, Cognos

IBM, DB2, Lotus Notes, Cognos

Wordpress, Blogging and Useful Stuffs

Wordpress, Blogging and Useful Stuffs

Home » Wordpress, Blogging and Useful Stuffs

How to make WordPress Permalinks work in Localhost

Submitted by techronnati on Thursday, 19 March 200914 Comments
How to make WordPress Permalinks work in Localhost

The other day i was playing around on my local WordPress installation when this error message appeared on my screen saying…

Not Found

The requested URL /Techronnati/wordpress/ibm-db2-cognos-tivoli-websphere-microsoft-google.html was not found on this server.

I was surprised. As a matter of fact, i was not expecting that to happen. Now you may probably ask, what the heck i was doing all along? You see, I was playing around on my wordpress’ permalinks structure, pretty much learning about Search Engine Optimization in the WordPress CMS. And so without much idea, i delved in and tried to investigate one by one that’s causing this error. Later on, i found out that WAMP or any other similar localhost webservers that can be run from a local computer do not have mod_rewrite enabled by default. I also discovered that the AllowOverride directive is set to none by default WAMP server installation, causing Apache to ignore an .htaccess file. If this is the case, your WordPress installation might return a 404 error, stating post not found and you would only be able to access your posts via a default permalink structure. I.E. http://localhost/yourwebsitefolder/?p=2. Collecting some information i got, here’s what i did.

  1. Using a text editor, open your httpd.conf file. In WAMP server, this file can be found in the \apache\conf directory
  2. Sift for the following line of code in that file.

    #LoadModule rewrite_module modules/mod_rewrite.so

  3. Next, remove the # from the line as seen below to enable the module: Just for information, # symbol is actually a comment syntax for httpd.conf. So this should look like this.

    LoadModule rewrite_module modules/mod_rewrite.so

  4. Then, search for AllowOverride in this httpd.conf file until you come to a line similar of the following:

    <Directory />
    Options FollowSymLinks
    AllowOverride none
    Order deny,allow
    Deny from all
    </Directory>

  5. Verify if AllowOverride All is indicated. Change “none” to “all” if found otherwise so this should look like this.
  6. <Directory />
    Options FollowSymLinks
    AllowOverride All
    Order deny,allow
    Deny from all
    </Directory>

  7. Save the httpd.conf file and Restart your wamp server. (Click on the ‘moon’ in the icon tray and select Restart Services)
  8. Login to your WordPress admin panel and set your custom permalink structure as desired. Then go view your site. Custom permalinks should now work on your localhost WAMP/XAMPP or other server.

Happy Blogging everyone. :-)

Popularity: 1% [?]

14 Comments »

  • Iyal Carmen said:

    Thank you. It has been a very frustrating experience not knowing what to do. Hours wasted. The rewrite_module was commented out. Glad to tell you that your articled helpmed me. :-)

  • techronnati (author) said:

    Wow, thanks Iyal for the sweet gesture. =) I am glad you are able to resolve your problem. =)

  • Scott said:

    Excellent! I was wondering what the problem was and now I know. Thanks for this tip – all sorted now.

  • Ben said:

    Thanks mate. This worked a treat.

  • techronnati (author) said:

    Good to know mate… ;D Enjoy blogging.. ;D

  • huseyin ertok said:

    Definetly it is working thanks a lot , ı can solve my problem with this informaiton.

  • Saroj said:

    Cool, no pain at all , Everything works fine for me on Wamp server 2.0
    http://localhost/wordpress/2010/12/08/hello-world/

    Thanks
    Saroj´s last blog ..Free Web Business IconsMy ComLuv Profile

  • Steven said:

    Thank you so much! I spent several hours already trying to solve this problem. This post was God send. Fixed my problem right away. You are a saint!

    Thanks

  • arnold said:

    thanks mate, I was about to pull my hair about this problem , thanks

  • Mark Shingleton said:

    Very handy. Just set this up for a client :)
    Much appreciated.

  • Nick said:

    Good stuff man great for fixing my issue with wamp pretty permalinks error, not working, broken. Hope the little key word stuff gets you some traffic thanks for the help it was great to go from problem to solution so easy.

  • Lac said:

    AWESOME! A half day long worked on it to find what the heck is the problem. Thanks Man!

  • Han said:

    Thanks very much for this, solved my problem straight away!

  • satish said:

    Sorry to say about your post i have tried your process but it is not working.But i get some good knowledge.Can you please help me to slove my problem.Thank you in advance

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

CommentLuv Enabled
Thank you for visiting Techronnati.com. I hope you enjoy your stay. =)
Close Box