• I’ll preface this post with a note that this was a really frustrating issue
    with a really simple fix.

    I was working on a site for a friend. Everything was working well. She wanted permalinks targeted at the postname. Of course, this was not a problem, as it is built into WordPress…

    Or so I thought…

    The Problem:
    When navigating to a specific post, we were getting a 404 error. The posts did exist and when previewing them from the admin page, all appeared in good working order.
    Upon logout, when navigating to the post, we would receive the 404 error. I then went back into the admin menu, to settings and changed the permalink structure back to the default. Log out of admin area and navigate to a post and there is no 404. So strange…

    Investigating:

    I did some digging in forums and whatnot. The most common thought that I found was that there could be some sort of problem with mod_rewrite in the .htaccess file or that the server might not have mod_rewrite enabled.

    After calling my hosting service, they confirmed that mod_rewrite was enabled on my server, additionally, I have several other wordpress sites through the same host that do not have this issue. Also, my .htaccess file was set to the default wordpress setting. So it wasn’t that…

    As with most problems that I work through, I had to leave this alone for a day and come back to it.

    I remembered that before I changed the permalink setting, I had converted two “pages” on the site to “posts” and deactivated the “old pages”.

    Cue my Ah Ha moment!

    I went to my posts page and used the quick edit feature to look at the post-name. Then I compared that to the old page-names. THEY WERE EXACTLY THE SAME! My thought is that WordPress was all confused because it kept finding multiple items with the same “post-name”. When the migraine wouldn’t go away, it just through the 404, like “AHHHHHH I give up, this post doesn’t exist!”

    I changed the page names to have “-old” on the end, changed the permalinks back to %postname%, saved, logged out of WordPress and Oila! It works!

    Now, before you ask, “Why did you keep the old pages?” The site is my friends and I wasn’t sure she wanted to delete them. Rest assured, I have told her that after she verifies that they are working, she should go ahead and remove the old pages.

    Anywho… my apologies if this post was a silly one, but I’m always amazed at how such “big” problems have such “simple” solutions. I hope this helps someone and saves them a little time.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘New – 404 Errors With Permalinks Set To %postname% – A Fix’ is closed to new replies.