Get a FREE Marketing Audit

How To Customize WordPress Error 404 Page

Share:
Reading Time: 2 minutes

What is a 404 page?

If you have been using the Internet for any length of time I’m sure you have clicked on a link or typed in a url on to be greeted with this lovely message, 404 ERROR PAGE NOT FOUND. This is the website’s server returning a message telling the user the page they are looking for does not exist.

404 error
Example of IE 404 Error

Why customize your 404 page?

At it’s worst you will see a plain page that consists of only this message and nothing else. This can leave your user feeling lost as their only options are to hit the back button or head back to Google and search again. 404 errors happen to even the best websites and we want to do our best as site administrators to keep our users happy and on our site, not searching somewhere else. This is why you should customize your 404 page to at least have your website’s navigation available. While your at it, why not add a few more helpful links and maybe a splash of humor?

Uhuru 404 Page
Uhuru Network’s 404 Page

How to customize your WordPress 404 page.

To edit your Theme’s 404 error template file:

  1. Open your WordPress admin panel:
  2. Choose Appearance menu.
  3. Choose the Theme Editor page.
  4. Check to see if your theme includes a ‘404 Template’ in the list of files.
  5. Click the link for ‘404 Template’ along the right side of the page.
  6. Edit the message text to say what you want it to say.
  7. Save your changes.

The default 404.php file will look like this:

<?php get_header(); ?>
   <div id="content">
     <h2>Error 404 - Not Found</h2>
   </div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

The default 404.php file will provide the user with your sites basic navigation. Within the <div></div> you will see an <h2>. You can change this text or leave it the same. You should definitely add some additional text after the <h2> and provide some links to different areas of your site that they may have been looking for. They should be able to get to these areas via your navigation but by highlighting them on your 404 page you eliminate the need for the user to hunt through your navigation.

You will need to understand some basic HTML tags but nothing you can’t learn in the first quick lessons of HTML on Codecademy.

If all you want to add is some text and a link here is a quick example.

<?php get_header(); ?>
   <div id="content">
     <h2>Error 404 - Not Found</h2>
     <p>This is an example of code for a 404 page. If you would like to go to Google click the link below.</p>
     <a href="http//google.com">Click Here</a>
   </div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

<p> Denotes a paragraph tag and </p> ends the tag.

<a> Denotes a link and is used like this, <a href=”http://example.com”>Example</a>, the word Example would be the clickable/visible text on the page and the URL is where the link should go to.

Do you have a unique 404 page? Do you know of a 404 page that you think is humorous? Share with us in the comments.

[authorfeed]
Recent Blog Posts
Free Guide
How Fashion Ecommerce Should Do Content Marketing
The Ultimate Guide

Uhuru Investor Acquisition Resources

Sign up to get free investor acquisition articles straight to your inbox. Learn our proven systems that we use to increase website traffic, leads, and revenue.

Written by

Peter Lang

CEO, Co-founder

Free Guide

How to Build a Full Inbound Conversion Funnel

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Leave a Reply

Your email address will not be published. Required fields are marked *

1 thought on “How To Customize WordPress Error 404 Page”

  1. oops, tried that and the 404 page is now blank saying communication error with site and it has reverted, but not to the 404 page that was there, to a blank page. Now it won’t change at all, saying ftp a new file, which I am having rouble creating. I should have heeded the theme message which said don’t do this.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 thought on “How To Customize WordPress Error 404 Page”

  1. oops, tried that and the 404 page is now blank saying communication error with site and it has reverted, but not to the 404 page that was there, to a blank page. Now it won’t change at all, saying ftp a new file, which I am having rouble creating. I should have heeded the theme message which said don’t do this.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.