Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How To Enable Custom Permalinks In WordPress Local Server Environment

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How To Enable Custom Permalinks In WordPress Local Server Environment

A problem that several of our users encountered with their local server installations of WordPress was that they couldn’t get permalink rewrite rules to work. Whenever they tried enabling custom permalinks all of their posts and pages would show “page not found” errors.

In order to fix this you need to turn on the rewrite module in you WAMP, XAMPP, or MAMP installation. Start by finding the WAMP icon in your taskbar. Navigate to Apache » Apache modules.

WAMP Apache Modules

This will bring up a long list of modules that you can toggle on and off. Find the one called “rewrite_module” and click it so that it is checked.

WAMP Apache rewrite module

After doing this your custom permalink structures should work immediately.

Alternatively, you can locate the local server. Go to the apache folder, then go to the configuration “conf” folder. Locate the httpd.conf file. Search for a line like this:

#LoadModule rewrite_module modules/

Simply get rid of the pound sign in front of it. So it looks like this:

LoadModule rewrite_module modules/

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Alice says:

    wow thanx been really strugling with that for a few days

  2. Estef says:


  3. kaan says:

    it worked like a charm. Until I saw your post, it took my several hours. Many thanks….

  4. Garet says:

    Finally ! It works ! A big thanks to you!

  5. Pushkar says:

    Thanks for guidance.

  6. Mishi says:

    Thanks a lot.
    404 Error is solved !
    God Bless you.

  7. charly says:

    thanks Dude, It just work fine!!

  8. umer says:

    i am just learning the wordpress, breaking my head for this error. You made my day syed. Thanks a ton!!!

  9. Mike says:

    Its that easy thank you……

  10. Charles says:

    You are a legend :)

  11. Jeremiah says:

    Please accept a warm hug from me!!! Thank you.

  12. Joe says:

    Worked like a charm.

  13. tanveer says:

    what about nginx? i am using wnmp which uses nginx.

  14. Doug says:

    Thanks! After trying various suggestions through Google, this is the only one that showed exactly what to do on the localhost server.

  15. Matt says:

    For of you who use WAMP and this tutorial still doesn’t solve your issue, be sure that you’ve added your local WordPress site’s directory in you httpd.conf file as follow :

    Options Indexes FollowSymLinks
    AllowOverride all
    Require all granted

    Replace YOU and DIRECTORY with your Windows username and the path to your local WordPress directory respectively.

    Hope that’s help some of you looking for a solution to enable pretty permalink for a local WordPress site on Windows with WAMP ;)

  16. Ankur Khurana says:

    Thanks a lot mate!! Saved a couple of hours of my effort.

  17. Alex says:

    Thanks man !!,

  18. kadija says:

    thanks a lot very clear article i appreciate it :)

  19. Sebastián Andil says:

    THANK YOU! Couldn’t find one sigle youtube video on how to properly do that! :)

  20. Stephen Behnfeldt says:

    The httpd.conf may set “AllowOveride None” for the root directory or htdocs, and this value will be inherited by all subdirectories. If this is the case, you will need to include a directive in httpd.conf for your wordpress directory, and include an AllowOverride directive inside. Something like:

    AllowOveride FileInfo

    The apache documentation will include more details:

    Hope this helps.

  21. vetiarvind says:

    WP needs to show a hint on the perma-link. I almost considered switching out of WP after spending 2 hours on this issue.

  22. Anuj says:

    Finally a solution that works. Thanks a lot!

  23. Textualidade says:

    Thanks a lot. it was very simple!

  24. Gydon Igboanugo says:

    Thank you!

  25. Ashish Patil says:

    I’m on MAMP and find that this solution won’t work with it.

    i tried to edit both .htaccess and httpd.conf file but no success.

    well my .htaccess is located at /Applications/MAMP/htdocs/wordpress/

    One more thing, if I’m logged in as admin on localhost all my single post pages works fine, buy as normal user or when i log out it gives 404 error.

  26. GranolaStorm says:

    Thank You !!

  27. George Malamidis says:

    Thank you very much! This was helpfull!!!

  28. DerekPadula says:

    Good lord almighty. 18 hours of straight hair pulling nonsense fixed with a single click. Thank you.

  29. keshvender says:


    but still getting a 404 error

  30. Lawrence Emeka Okpor says:

    Thanks a bunch. You guys are awesome! Most sites keep telling to modify the .htaccess file. What most beginners need is sommething that works on a local development system

  31. Younes Yaich says:

    Thank you

  32. fateh says:

    thanks you

  33. Thronebound says:

    Nice one! really great tutorial

  34. chetan says:

    Clear instruction with images . Easy to follow. Thank you.

  35. Chamith Kanchana says:

    Thank you very much… Finally find a solution for permalink..

  36. Susana says:

    Thanks for the information! It worked fine.
    Gracias por la información! Funcionó muy bien.

  37. Varun Kannan says:

    thanks a lot. it worked well .
    Great post . very easy to understand

  38. Levi says:

    I’m trying to add a permalink off my domain as simple as “1.” But it keeps updating from “1” to Why does it have to say 1-2? Is there a fix for this?

  39. Anas says:

    Thank You :D

  40. Mark says:

    Thanks, solved my problem using WAMP.

  41. jack says:

    good article. i just got it done following your article. appreciate your effort.

  42. Rahat Haider says:

    This is really a great tutorial for the permalink setting problem. I was doing all staffs for the live to solve my permalink setting problem that was ‘404 page not found ‘. At last i found this article that deals with the local server that user wamp. Really a helpfull one.


  43. prasanna kumar says:

    Thanks a lot. Was really a great help.. Well done.

  44. Alex Roussinov says:

    Perfect, just what I was looking for! Thank you!

  45. Juan says:

    Well that was easy….Thank you!

  46. Harry Saggu says:

    Thanks ….Finally all set with this solution.
    i have tried so many search on google but no one suggest me to do change in my local wamp.

  47. robo ek says:

    This pretty permalinks on local server tutorial is what I have searched for. Thanks

  48. kv says:

    not sure ig your familar with instant WP, but this fix doesn’t apply to its local installs! Ant Ideas Thanx

    • Editorial Staff says:

      This method works with most local servers. Instant WP is a script. You should probably ask their devs. why it doesn’t work. We never tried InstantWP.

  49. wmwebdes says:

    Thanks peeps.
    I use XAMPP as my local install and have wondered how to enable pretty permalinks.
    Now I know.
    Many thanks.

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.