Support » Fixing WordPress » 404 error and permalinks

  • Resolved rwanwork

    (@rwanwork)


    I guess 404 errors are fairly common but that is what I’m faced with on our WordPress 4.5.2 installation. I’ve read various advice that turning off permalinks and turning them back on is one option but that isn’t working for us.

    If I leave permalinks off, then the articles can be found. But once I turn them back on, it doesn’t work again — I get 404 errors.

    I even tried to install the “Debug This” plugin, according to the instructions here. I can’t quite understand the output, but I can’t find a match. So, that looks to be a problem; but I don’t know what is doing the URL rewrite. Or how to go from here…

    The Apache server logs do not offer any clues — only 404 that the file isn’t found.

    Can anyone suggest a step-by-step list of things I should look at? Or perhaps some logging information that can give more information than the Apache logs? Previously, things worked out with an earlier version of WordPress (4.4), but we didn’t check thoroughly after the upgrade. So, I’m not too sure if the upgrade is the cause.

    (Also, this site was previously hacked and we reverted back to a backup that was most likely prior to the hack. I don’t know if there’s a problem with this — could we have not gone far enough back with the backup.)

Viewing 4 replies - 1 through 4 (of 4 total)
  • 1.Check your htaccess and make sure you use right ‘Base url’
    2.I guess this will work when you permalink with ID(www.domain.com/?p=23) not with post name (www.domain.com/about). If yes then check permalink section and turn on with post name and replace default option.
    3.Sometimes permalink will not work if you use ‘/%post name%/’ remove ‘/’ at the End.

    Thank you very much, vizwa, for your suggestions!

    I’ve solved my problem! It wasn’t a problem with any of the items on your check list, but it did lead me towards what I should and shouldn’t be looking at.

    As it turns out, I was missing “AllowOverride FileInfo” in my web server configuration. Yes, I know it is required in order to make use of .htaccess. So, it was a silly mistake that I only realized after going through the check list here.

    The funny thing is, while I was trying to solve my problem yesterday, this line was missing but sometimes, permalinks did work. Also, I have another WordPress instance that is slightly older (4.4) and it seems to be working without this directive. Based on my understanding, it should never work without this in the server configuration.

    So, I’m a bit confused… But, with my problem solved, I will have to convince myself that maybe I was day dreaming before or something.

    Thank you for your help!

    I am using wp4.7. I am noticing that a post would disappear after a few hours and render 404 error instead!! It does not happen to all posts … which makes it even weirder.

    Hi,

    As you can tell from the top of this message, I have marked my problem as being “resolved”. Posting your message here won’t get any attention since most people will ignore threads that have been marked “Resolved”…I suggest you start a new message yourself. (You might want to give more details…the above you’ve given is a bit too little to go on.)

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘404 error and permalinks’ is closed to new replies.