How to Edit 404 Page in WordPress

Posted on 23. Dec, 2009 by Isaac Yassar in WordPress

404Hi buddy!

Do you remember how your 404 Page looks like? If you use WordPress for own domain publishing, it’s usually on www.your-domain.com/404.php

404 Page serves to inform visitors if they are heading to a link that doesn’t exist on your site. The link could have been deleted or moved so the page is not found.

By default, every WordPress theme has a layout for 404 Page. If you want your 404 Page to be more unique, you can edit it yourself.

There are two things you can edit easily in your 404 page: its text (including header) and its image. The text is to inform the visitors coming there (that their destination is no longer exists). The image is to add some illustration and aesthetics.

To edit 404 Page on WordPress, you can:

1. Login to your WP Dashboard
2. Go to Appearance >> Editor
3. Choose 404.php from the right part of your screen
4. Edit the codes
5. Update file, and done

Some notes:

The text you can edit easily is usually between <p> and </p> .  The 404 Page header is usually between <h1> and </h1> . Just visit your 404 Page to see the text you can edit.

To add an image, you can use the tag <image />, such as:

<image src=”http://www.somewhere.com/image.jpg” style=”float:left; margin:10px;” />

Here is my 404 Page as an example. I edited it a little and added a cute little image.

It’s quite easy to edit 404.php . But if you are unsure about the result, back up your 404.php first. Feel free to try!

Tags: WordPress

18 Responses to “How to Edit 404 Page in WordPress”

  1. Gloson

    23. Dec, 2009

    And if you want to display your most recent posts, here’s the code ;-)

    Latest Posts

    <h2>Latest Posts</h2>

    <ul>

    <?php

    query_posts(‘posts_per_page=10′);

    if (have_posts()) : while (have_posts()) : the_post(); ?>

    <li><a href="<?php the_permalink() ?>" title="Permalink for : <?php the_title(); ?>"><?php the_title(); ?></a>

    <?php endwhile; endif; ?>

    </ul>

    </p>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

    It helps to convert 404 page visitors from search engines into loyal ones. ;-)

    Reply to this comment
    • Isaac Yassar

      23. Dec, 2009

      Great addition Gloson, Thanks. I’ll try it soon. I think my 404.php already has the get_sidebar and get_footer. I’ll check it out.

      Reply to this comment
  2. Dana @ LetUpdate

    23. Dec, 2009

    My 404 page is still basic so i will optimize it. Many blogger say that we must optimize 404 page so the readers tend to click other post available.

    Reply to this comment
  3. Blogger Den

    24. Dec, 2009

    Really good article for Wordpress newbies, a 404 page isn’t all that thought of but it is a big aspect of your website. gotta make sure it looks nice and gets the point across

    Reply to this comment
  4. Anne @ b6s.net

    24. Dec, 2009

    Thanks for the tip! Along with Gloson’s idea, this is quite useful!

    Reply to this comment
  5. Tech-Freak Stuff

    24. Dec, 2009

    Having a custom 404 page always has a great impression on the readers. But I personally feel, rather than spending long times on editing the 404 page we must try that the 404 does not arise.(I know it may arise because of the visitor’s mistake too)

    Reply to this comment
    • Isaac Yassar

      25. Dec, 2009

      That’s a good point buddy. We can make such mistakes in sharing our links on social media, resulting a 404 Page impression. That is our mistake, we got to avoid it.

      Reply to this comment
  6. Dan | Dans Blog

    27. Dec, 2009

    I like simple 404 pages so it’s very clear to the user that he didn’t get what he found. But adding recent posts and stuff you might confuse the user.

    Reply to this comment
    • Isaac Yassar

      27. Dec, 2009

      That’s a good point my friend. If our navigation bar is clear enough, I think 404 visitors will find a way to go somewhere else if they want to. Not to mention the sidebar :-)

      Reply to this comment
  7. Janoe

    02. Jan, 2010

    Thanks for this tips. It gives a lot use to me because I want to edit my 404 page.

    Reply to this comment
    • Isaac Yassar

      02. Jan, 2010

      It’s my pleasure buddy. Good to see you here. I see that now you have your own domain, that’s great :-)

      Reply to this comment
      • Janoe

        03. Jan, 2010

        it’s not a “real” domain if you know what I mean, but soon I’ll get my own domain and web host. Nice template, I got one from WOO Themes too. Now I’m still maintenance newest blog. :D

        Reply to this comment
        • Isaac Yassar

          03. Jan, 2010

          Good to hear it buddy. Let me know the address of your own domain once it is ready.

          Reply to this comment
          • Janoe

            03. Jan, 2010

            My newest blog is http://ezineblog.co.cc but it still have a lot of maintenance to be publicize. Anyway, did you have heard about Linkworth.com? It very useful if you have a site that have Google PR more than 3. You can earn a lot from there. Best regard.

            Reply to this comment
            • Isaac Yassar

              04. Jan, 2010

              Yeah, I have an account there. But I’m not interested with their products yet. I don’t do dofollow reviews or dofollow link ads because Google is against all paid attempts to flow PR. I play nice, that’s my approach.

Leave a Reply