Support » Fixing WordPress » 404 Errors With Permalinks Set To %postname%

  • Hey guys I have been racking my brain on this all day.

    I can not for the life of me get the Permalinks working on my site. I have done this a million times and its just not working.


    Permalinks: Post Name

    Ok here is what I have done so far:

    1) Disabled all plugins to check for compatibility (still did not fix the issue)

    2) Double, and Triple Checked The .htaccess ….. its exactly as should be:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    3) Checked Cat Names, Post Names, Page Names and see if there are duplicated that would create a conflict. With no luck

    4) Called the hosting company and they cant seem to figure it out.

    If anyone can help me work through this that would be so AWESOME!!!! As Im over here pulling out my hair on this one.

Viewing 15 replies - 1 through 15 (of 21 total)
  • This is definitely a server issue – not a WordPress one. Check with your hosts that mod_rewrite is running on your server.

    Oh one thing I also forgot to mention ….

    The rewrite rules work fine when I enable WooCommerce, but ONLY on the Woocommmerce pages. Meaning on the product and store category pages, but not on blog, post, or normal pages.

    Hey guys …. put this back on the hosting comp and they still have not figured it out. They told me my theme required additional plugins to work but as far as I know the theme doesnt require any additional plugins.

    Anyone else have feedback on this?

    Can you replicate the problem using the default Twenty Thirteen theme with all plugins deactivated?

    Hi Esmi …

    I deactivated all plugins and turn on the Twenty Thirteen theme and it doesnt give me 404 Errors, but just reloads the index page.

    I did a fresh install of wordpress in a new sub directory and turned on Permalinks there and they work great. So that should show its not a server issue.

    I then installed a fresh install of the theme (still in the new sub directory) and its still working great.

    Then I installed all the current plugins (in the new sub directory) and no issues there either. As permalinks are working fine with a fresh install of all wordpress, the theme, and the plugins.

    My guess is there is some file issue in the old install or a database issue. I FTPed the fresh wordpress files up to overwrite the old files and that had no affect, also did the same thing with the theme files as well. So it leads me to lean to the fact there is a hiccup with the database. Any idea of what / where I can look at in the DB to see if its an issue there?? or any other thoughts?

    Cheers! and Thanks for the help!

    My guess is there is some file issue in the old install or a database issue.

    It does seem to be site specific but I’m not sure I’d know where to look for a specific db issue. Have you tried repairing all of the db tables?

    Yea … I have narrowed it down 100% to the Database.

    On the new install I I pointed it over to a copy of the other installs DB and it instantly broke the permalinks.

    I really have no clue where to look in the DB for this functionality. Do you?

    Sorry – no. The close inter-relationships between the various db tables make troubleshooting this kind of issue an absolute nightmare.

    What you could do is set up a new install in a sub-folder using a fresh database, then reset the permalinks to default in the old site and export the site’s content using Tools -> Export. Finally import the content into the new site using Tools -> Import. If the new site continues to work with custom permalinks, pull the old site down and see Allow WordPress to take over the root domain.

    It’s a bit messy but it’s probably the fastest way to get a working site running in the root domain with custom permalinks.


    Thanks I was worried about that …. I also have Woocommerce installed and have 100s of products so I have to deal with moving all those as well.

    Ill see what I can come up with. Thanks for the help.

    Also if anyone has else has any DB ideas please feel free to chime in.



    I’m assuming you’ve fixed this by now, but I had the same issues, symptoms, and had tried many of the same solutions. After a bit of digging I was able to find a solution through an easy database fix and wanted to share for anyone else who might reference this post.

    In your WP DB find the wp_options table. In this table look under the option_name for home. The value should be your website base URL, Change this value to and commit the change. Now you should be able to switch permalink structures back and forth without errors.

    To hide the WP install directory from being displayed in the URL change the value for home back to your base URL, You should still be able to switch permalinks structures without issues. For me, this seemed to overcome the gremlin was at work in my DB. YMMV.

    My blog was working fine until I changed the permalink on one page ( It caused all of my blog posts (on a different page with a different permalink – to mirror the same permalink ( as the changed page. The result, all of my posts appear if you scroll through them one at a time per the bottom page 1, page 2, page 3 buttons. However, If you try to access the pages any other way… there is a 404 error… because none of them have a unique permalink… they all have ( When I try to change the permalink… it is greyed out and I can’t even type to modify it. Feeling really cornered in here. Any help would be greatly appreciated before I rebuild my site from scratch.


    This problem occurs if mod_rewrite function is not probably working on the server, in this case you’ll need to contact the host provider to enable this function or you can simply overwhelm this issue by manually editing the .htaccess file. It should look like this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    If it doesn’t contain what is written above then definitely this was the problem, so just add it, save the file and refresh your page (it should work).

    If the problem exists then you should consider installing a fresh copy of WordPress.

    I just fixed this after alot of digging. I’m developing locally at /localhost using WAMP in Windows (I suppose that’s obvious.) Found the answer at How-to-enable-Apache-modules

    The problem was (for me) that Apache installs with rewrites disabled so
    I had to enable rewrites_module.

    Scroll down to the windows section of the link and here’s what it says:

    “WampServer. This is by far the simplest option. If you have installed WampServer just click on the icon in the task bar, hover over the Apache section in the menu that comes up and then hover over the modules section. You will be presented with a list of modules. Simply click on a module name (rewrite_module) to enable it (or disable it if it is already enabled). A check mark next to a module indicates that it is enabled. WampServer will automatically restart the Apache service after you enable a module.”


    Thank you so much, this is exactly what i am using as well (WAMP)… All fixed!

    @djmiller78 – Thank you!!!! This was driving me batty. I had brought my live set locally and I had it working 99%, except for this. I found that was commented out. Uncommented and POOF it was working.

    Thank you, my hair thanks you. 🙂


Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘404 Errors With Permalinks Set To %postname%’ is closed to new replies.