What happens when you or your visitor visits a non-existent web page? As, expect the webserver or browser returns an error, the 404 Page not found error. In all truth there is no way you can avoid this, that is why I want to show you how to create a custom 404 page in WordPress.

It is unavoidable for many reasons;

The obvious, there could be a typo on the slug – instead of going to someone goes to

Or, you edited your articles, and somehow, the slugs changed.

Or, as you should, in maintaining your website, you got merged and got rid of some articles and forgot to redirect the old links, or the redirects are just not working.

As you can see, there are many possibilities for what may cause a visitor to visit a nonexistent page.

Whatever the reason, we can agree that it can be annoying not to find what you are looking for.

So instead of serving the boring default 404 page, you can create a custom page that’s more helpful to a visitor or even shade light on your brand humor.

If we agree that it is annoying to hit the unavoidable dead-end of a 404 page not found error, then we can agree that every website must have a custom 404 page to give a reader a way out for what could be the dead end.

As you create one, here are a few tips to consider for a useful 404 page in WordPress

If you need inspiration, here is a collection of some of the best 404 pages. Borrow a leaf.

Create A 404 Page in WordPress in 3 Ways

There are a couple of ways you can create Page in WordPress.

Before you go hacking and messing with code, try the most obvious;

Way 1. Most modern themes come with custom 404 pages.

All you need to do is, go to the theme options and look for the 404 page setting.

Please enable it and then select your custom page.

Theme custom 404 page

Note that, if you can see the option to choose a custom 404 page, then you can create a page as usual, then come back to the settings and select your custom 404 page.

If you need help, consult your theme developer or read through the theme’s documentation.

Way 2. Use a plugin to create a custom 404  page.

If your theme does not come with the custom 404  page, then you can use a WordPress plugin to create one.

I will use 404page – your smart custom 404 error page plugin for this article.

Login to the admin side of your WordPress website, then under Plugins in your menu, go to Add New.

Search for 404page – your smart custom 404 error page

When the results load, click Install Now, then Activate the plugin.

Install 404 page WordPress plugin

Now, go to Pages and create a new page. (Pages > Add New)

Create a page to your imagination and then publish it.

404 page

Next, go to 404 Error Page under Appearance on the main menu.

Set 404 plugin

From the drop-down menu, select the page you just created and then click Save Changes.

404 plugin save changes

You can now test your page.

Note that if you have a caching plugin, clear or purge all cache before you test your custom 404 page.

Way 3. Editing your theme to create a custom 404  page.

You can also create a custom 404 page in WordPress by editing your theme.

You will need to be comfortable mucking around with code for this. If you do, here is an excellent writeup on the WordPress Codex site on Creating an Error 404 Page.

Before you edit your theme, I recommend backing up your data, our plugin, WPVivid can help you with this.

Once the data is backed up, create a child theme for any third-party code changes to a theme.


In this article, I have shown you how to create a custom 404 page in WordPress.

If you get lots of 404 errors, then you need to dig deeper to understand the underlying issue.

If pages that you know exist all of a sudden show a 404 error, then you may want to check your permalinks.  You can save the day by just going to permalinks under Settings and click Save Changes.

If it is a particular page, then that could be a content piece idea.

You may also find that you need to redirect pages you’ve changed correctly.

When it is, however, unavoidable, a 404 page will keep your visitors on your website. Instead of them clicking away, they will explore your website by going to the relevant links on your custom 404 page.

PHP Code Snippets Powered By :