Support » Everything else WordPress » How to stop WP default 404 error

  • Hi, I’ve got a WP site, and I’ve created several pages via the Admin panel to act as my error pages (400, 401, 403, 404, and 500). I’ve edited my sidebar.php file so that it will hide all the error pages from my main page (but they can still be visited via direct URL). I’ve setup my .htaccess file to redirect to these pages for each individual error type. But it seems when someone trys to access a page that doesn’t exist (error 404) they get just a simple WP 404 error message. I think that WP has got a default 404 error page, and I think it’s somewhere in the index.php file but I wanna make sure before I change anything.

    For example, here’s the page you get when you try to access a page that doesn’t exist:
    And here’s the page that I WANT it to show:

    Help? Thanks! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • Since you are using the default WP theme… a quick look at the theme folder would reveal the existence of a 404.php file 🙂

    I know, I’ve seen the 404.php file, but when I delete it and try to access a non-existant page, it just points to the index, not to my custom error page 😕

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to stop WP default 404 error’ is closed to new replies.