Page not found error when changing WordPress permalinks

01 April, 2014 by Tom Elliott

This post should help fix the ‘page not found’ error encountered in WordPress when trying to access non homepage pages after changing the permalink structure. I don’t mean the regular WordPress 404.php page, just a plain old 404 error.

404 page not found

The most common cause of page not found issues I’ve seen is that ‘mod_rewrite’ is not enabled. This is a required module that WordPress uses to rewrite your ugly URLs (such as into a friendly URL structure like ( The page not found problem can often occur in new WAMP or Apache installations, that don’t always enable mod_rewrite by default.

A good way to check if you have mod_rewrite enabled would be to create a new PHP page in your website root and use the phpinfo command:

<?php phpinfo(); ?>

This will give a load of information about your PHP environment including your Apache setup and available modules.

Check the ‘loaded modules’ section for ‘mod_rewrite’ as shown below. if you don’t see mod_rewrite then you will need to activate it from within Apache’s http.conf file.

phpinfo loaded modules

mod_rewrite should exist in phpinfo ‘loaded modules’ section

If you’re not sure where http.conf is located, check the ‘Server Root’ line in phpinfo. The httpd.conf file should be in a ‘conf’ folder from within your Apache root.

Open httpd.conf in Notepad or any regular text editor (always a good idea to create a backup first) and find and remove the hash # from the below line to activate:

#LoadModule rewrite_module modules/

After restarting Apache, mod_rewrite should now appear as a loaded module in phpinfo. The page not found error should now be fixed and you can carry on creating your awesome WordPress theme!

Intermittent white screen problem in WordPress »

One Comment

  • karthic says:

    Thanks a lot for the post