Subscribe to RSS Feed


No Gravatar

So I recently switched linux distros on my web server that hosts this wordpress blog. I tar’d up my wordpress files and dumped a database backup as well. I copied those files to my local machine and then performed the re-install. After the install, I imported the wordpress database, transferred back the wordpress files and all seemed to work well.

I noticed a day later that my wordpress permalinks were broken. All of the pages were displaying a 404 error. I confirmed that I had the apache mod_rewrite enabled and that the .htacess file was being re-written. I switched back to the default permalinks (?p=145) and the site worked as expected. For search engine optimization, however, I needed to figure out the custom wordpress permalinks issue. I tried a few wordpress plugins to resolve the missing permalinks with no solution to be found.


This gave me the idea that perhaps the .htaccess file was being ignored. An easy way to test this was to put some invalid command (I just typed the word broken) and see if the site returned a 500 error. Well, it didn’t. Ah-HA! I have at least narrowed down the issue.

I found that within my vhost configuration, I was missing a couple directives.

Options FollowSymLinks
AllowOverride All

I added those to the <Directory /path/to/site></Directory> instructions and ran a config test. All was solved after restarting apache. Permalinks now successfully work. Thanks to all of the contributors out there that posted information on troubleshooting the issue. Hopefully, this recap will help others out as well.

Tags: , , , , , , , , , , ,

2 Responses to “ WordPress Permalink 404 Error – Page Not Found ”

  1. me too!No Gravatar
    June 7, 2010 at 4:48 pm

    my htaccess file looks like this and I am experiencing the same issue. Where should I add those directives? –thanks in advance!

    # BEGIN WordPress

    RewriteEngine On
    RewriteBase /blog/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]

    # END WordPress

  2. ShaunNo Gravatar
    June 7, 2010 at 6:30 pm

    You should look to see if there is a block similar to this in your htaccess:

    <directory path/to/site>
    </directory>

    If not, you’ll need to add one. Make sure to set the correct filepath to your sites web directory. When you are done, it should look something similar to this:

    <directory path/to/site>
    Options FollowSymLinks
    AllowOverride All
    </directory>

    Hopefully, that helps.

Leave a Reply

This site is using OpenAvatar based on OpenID

Olebox - Shaun Oleson is using WP-Gravatar