permalinks not working - how to fix              rev 30 June 2016 ➽ back to dir

    Permalinks are usually a no-brainer. They should just work. But sometimes
    we find some problem setting them up on our first website.
    Here's what i have found over the years:

First - check the website .htaccess file:

   1. Make sure that there is a file .htaccess in the document root of your website.

   2. Make sure that it has the following lines in it:

        RewriteEngine On
        RewriteRule ^index\.php$ – [L]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /index.php [L]

   3. If on *nix-based OS, make sure that the permissions on the file are rw-r--r--

All OK?

Still not working? Check your server httpd.conf
    This will be located in different places depending on your operating system.
    It even may not be named httpd.conf. That's up to you to figure out where it is  :)

Open httpd.conf in your good text editor, and 
1) Look for this:
  <Directory YOUR_DOC_ROOT>
    AllowOverride All

If it says
       AllowOverride None
change that to
       AllowOverride All

2) Look for this:
    #LoadModule rewrite_module modules/
    Take away the hash sign (#) at the beginning of the line, so it looks like this:
    LoadModule rewrite_module modules/

    Special OS cases - Mac and Ubuntu have decided to be Special Snowflakes, and
        loading the rewrite module may not be as straightforward as above.
        It's up to you to know how it works on your OS. Don't ask me  because i don't know.
        Here's info i have about Ubuntu as of feb 2012. This may have changed since then. 
        But it gives an example of how things may be excitingly different:
        * Ubuntu:
          1. Check that /etc/apache2/mods-available/ contains a file called rewrite.load
            a. If not, get it through your Package Manager.
          2. Make a symbolic link from mods-enabled to mods-available
            $ sudo ln -s /etc/apache2/mods-available/rewrite-load /etc/apache2/mods-enabled
          3. Enable 'AllowOverride All'
              a. check that all permissions are set to read and write, not just read only
                (rw-rw-rw - chmod 666)
              b. In 000-default it will probably say AllowOverride None in several places.
                 a. Find the one for where you’ve installed WordPress, and change it to AllowOverride All.
                  Example: if WordPress is installed at var/www/????? then it may be under the Directory “/var/www” grouping.

3) OK. Save your httpd.conf (or whatever Special Snowflake Stuff is going on), and restart apache!

4) Now go back to the permalinks section in your wordpress admin.
  Change it back to the default, save it.
  Then change it to the permalinks that you want and save again.

  Usually, this fixes the problem.

Still not working? Dang! Maybe some plugin is causing trouble.

First, reset everything:

  1. Change the permalink settings to default:
    a. go to your wp-admin
    b. Change permalink settings to the first thing you see in the list
      (something like

  2. Disable all your plugins

  3. Delete the existing .htaccess file
    (Don't worry - WordPress will make it again - or you can).

Now try a pretty permalink setting:

  1. Go to your wp-admin
    - Change permalink settings to the one you wanted.

  2. In the browser, go to or reload a page on your site.
    - Click on a menu item and see if pretty permalinks are
      working now.

If - permalinks working ok:
  Now it's time to see which plugin was causing problem!

  1. In your wp-admin, start activating the plugins one by one.
        Or, if you have a lot of plugins, use the half-half method.
          activate half. If problem solved, the problem plugin is in the other half. 
            activate half of those, etc until things break.
          (If it's a live website, be sure to put it in maintenance mode first! 
            both for security, and to be nice to your users.)
  2. Each time, check permalinks.
  3. When you find the plugin creating problem:
    - deactivate it
    - go back to the permalink settings page and hit on the save (changes) button.

  You have solved the problem: you can look for update for that bad plugin, or else just don't use that plugin.

If - still "not found"?
  1. Check your .htaccess file, and make sure it has the rewrite code (as at top of this page).

If - still "not found"?
  No idea. I've never run into problem after that!
written february 2012