• Hey,
    I have experience building sites from scratch but not much experience using WordPress.

    The theme I am using has a 404 template in that theme’s folder.

    However it is not being used when I type in an invalid URL.

    I’m running Apache on Ubuntu so I have access to the apache configuration.

    If this was a site I built from scratch I would add
    ErrorDocument 404 /404.php

    But how do I get WordPress to use my theme’s 404 page?

    I’ve tried adding the ErrorDocument 404 and then the path to the 404 template but it’s still not working.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You don’t need to do that. WP will load the theme’s 404.php if Apache is configured correctly.

    Add this in your apache config:

    <Directory /path/to/where/you/installed/wordpress>
       AllowOverride All
    </Directory>

    and restart apache.

    Thread Starter burnedfaceless

    (@burnedfaceless)

    Thanks Steve, that did the trick.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to enable a custom 404 page in Apache2’ is closed to new replies.