Support » Fixing WordPress » Template 404 file not working

  • Resolved kmccoll


    Whenever I browse to a non-existent file, I get the standard apache 404 message instead of my own. Plus, interestingly, a message saying it failed with the custom 404. The exact message:

    Not Found
    The requested URL /123 was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    I am not using structured permalinks, if that has any relevance (a restriction of my host).

    The site is if you want to see for yourselves.

    Any clues?

    Thanks all

Viewing 6 replies - 1 through 6 (of 6 total)
  • Contrary to how it may seem, the 404.php file isn’t for true 404’s, it’s for when no posts are found.


    If you want it to truely be your 404 page, edit/create a .htaccess file and drop this in it:

    ErrorDocument 404 /wp-content/themes/ijammingnet/404.php

    That should do it. 🙂

    Actually, you ought to use this instead of directly linking to the 404.php file:

    ErrorDocument 404 /index.php?error=404

    Thanks guys – that’s done the trick. Much happier now – cheers.

    Although… just fyi, my custom 404 does *not* appear for when a search doesn’t find a post (my custom search page handles that) . Not important to me though.



    I’m also encountering this problem. I’ve checked to ensure that each folder and file is in it’s proper place, but I’m still receiving the error. Is there anything else that could cause it?




    Sorry, I posted the question to the wrong place. Please disregard.

    The above solution failed for me, I think because there was another issue: MSIE apparently doesn’t display 404 custom pages below 512 bytes. If for some strange reason–I for example am SSI-ing the pages in question–you want a tiny or blank 404, creating enough text to get above 512 and then commenting it out seems to work.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Template 404 file not working’ is closed to new replies.