How to Make WordPress Permalinks work in Localhost

Recently I was trying to try a new WordPress theme on my Local machine & I was pissed off to see that WordPress Permalinks are not working on my local PC.

I was using WAMP software for testing WordPress theme,I thought restarting all the services after changing Permalink structure would work on the go, but it was not the case.I’m still getting “Not Found” The requested URL /wordpress/hello-world.html was not found on this server” error.

After doing some research I found the problem is because of two things.

  1. mod_rewrite( module is not enabled by default.
  2. AllowOverride directive is set to none by default, as a result Apache ignores .htaccess file

How to Make WordPress Permalinks work in Localhost

How to make WordPress Permalinks work in Local Host (WAMP/XAMPP):

To make permalinks work please complete the changes listed below.
Using a text editor, open your httpd.conf file. In Wamp, this file is found in the C:\wamp\bin\apache\apache2.2.22\conf

  • Search the file for the following line of code:

#LoadModule rewrite_module modules/

  • Uncomment the above line by removing # from the line as seen below to enable the Mod_rewrite module:

LoadModule rewrite_module modules/

  • Next, in httpd.conf replace “AllowOverride none” under your  DocumentRoot section to AllowOverride All.
  • Save the httpd.conf file.
  • Check your Local Host WordPress instance! Now your permalink structure should work.

In case your Permalink structure is not working even after making the above changes, try to restart your WAMP/XAMPP server & this should do the job for you.

If you have any query please let me know in comment section and I would be ready to help you.Also follow us on Twitter to get updates on WordPress Tutorials instantly.