Free tools Windows power users keep installed
One-click scans. No signup required.
Improve a WordPress 404 page by identifying your theme type, then editing the correct template: use the Site Editor for a block theme or a 404.php file for a classic theme. Give visitors a clear explanation, preserve normal navigation, add search and a few useful destinations, and test the result with a URL that does not exist.
What an effective WordPress 404 page should do
A 404 page appears when the requested content cannot be found. WordPress describes it as a way to help visitors “arrive at the right place,” rather than leaving them at a dead end. Your page should therefore combine a short explanation with an obvious next action.
- Explain the problem: Use a plain heading such as “Page not found” and one brief sentence explaining that the URL does not resolve.
- Keep the site familiar: Retain your logo or site title, normal typography, header, and primary navigation where the theme supports them.
- Provide a route forward: Add a search control and links to the home page, important categories, or other high-value destinations.
- Stay readable: Check contrast, text size, spacing, and the layout at narrow mobile widths.
- Use humor sparingly: A light message is acceptable only when the explanation and next step remain unmistakable.
Do not replace every missing URL with an automatic redirect to the home page. Visitors should be able to tell that the requested address was not found and choose a relevant destination.
First identify your theme type
The editing workflow depends on the active theme. WordPress associates 404.html with block themes and 404.php with classic themes. The available interface and template can vary, so confirm what your active theme provides.
| Theme type | Template format | Where you edit | Code familiarity |
|---|---|---|---|
| Block theme | 404.html |
Site Editor’s Templates area, when the theme exposes a 404 template | Usually none; changes are made with blocks |
| Classic theme | 404.php |
The theme’s template files through your established development workflow | PHP and theme-structure knowledge are useful |
See WordPress’s template-file reference for the roles and names of common templates.
Improve a 404 page in a block theme
Block themes let you edit site areas and templates with blocks in the Site Editor. Many include a 404 template, although the exact controls depend on the theme.
Rank #2
Open the 404 template
- Sign in to WordPress and open Appearance → Editor to launch the Site Editor.
- Open Templates and look for a template named 404 or Page Not Found.
- Select the template and choose Edit. If no 404 template is listed, check the theme’s documentation or determine whether the active theme supplies one before changing anything.
The Block themes documentation explains the Site Editor model, and the Template Editor documentation notes that many block themes provide a 404 template.
Build useful content with blocks
Keep the design focused. A practical arrangement is a heading, a short explanation, a Search block, and a small group of links or buttons to destinations such as the home page and key categories. Preserve the theme’s header and footer unless removing them is an intentional design decision.
- Replace the existing heading with a direct message, for example, “Sorry, we couldn’t find that page.”
- Add one sentence explaining that the address may be outdated or mistyped.
- Insert the Search block and place it close to the explanation.
- Add only the most useful links, such as Home, a documentation hub, or major category pages.
- Use the Site Editor’s style controls to match the theme’s spacing, colors, and typography.
- Select Save and confirm that the template changes, not just a single page, are being saved.
The Learn WordPress tutorial Personalizing your 404 Template demonstrates customizing a block-theme 404 design with blocks and patterns.
Improve a 404 page in a classic theme
Classic themes use PHP templates. The file associated with missing content is 404.php; the active theme may already contain it, or the theme author may need to create it.
Rank #4
Locate or create 404.php
- Check the active theme’s files for
404.php. - If it is absent, create that file in the theme’s normal template location through your established theme-development workflow.
- Keep a backup or use version control before changing PHP files, particularly on a production site.
- Follow the theme’s existing structure for loading the header and footer, then add the 404 content inside the theme’s main content area.
The official 404 Pages guidance shows a classic-theme example with explanatory text and a search form. Adapt its structure to your theme rather than copying markup that conflicts with your theme’s classes or layout.
Include a clear message and search
Your 404.php output should identify the missing page, explain what visitors can do next, and include a search form or the theme’s equivalent search component. Add links to a few high-value sections if they help people recover. Do not assume that editing a parent theme is safe for future updates; use the update-preserving workflow you normally use for that theme, such as a maintained child theme or version-controlled source.
Recommended Free Tools
Best Value
Quality checks before publishing
After saving the template, verify the actual front-end experience rather than relying only on the editor preview.
- Open a URL on your site that is guaranteed not to exist, such as a deliberately random path.
- Confirm that the intended 404 template appears and that the heading explains the problem.
- Submit a search from the page and check that the control is usable and returns the expected search experience.
- Follow every included link, including the logo, home link, and category links.
- Review the page at desktop and mobile widths.
- Navigate by keyboard and ensure the links and search control have a logical focus order and visible focus indication.
- Check that text remains readable against its background and that no element is clipped or requires horizontal scrolling.
A visual template does not by itself prove which HTTP response status your hosting stack sends. Caches, redirects, plugins, and the host can affect that response. If status-code correctness matters, inspect the request in your browser’s network panel or with an HTTP inspection tool and verify the actual response for a missing URL.
Common mistakes to avoid
- Editing the wrong layer: Changes to a page named “404” do not necessarily change the theme’s 404 template.
- Assuming every theme has the same controls: Site Editor options and template availability differ by theme.
- Overloading the page: A long list of links, ads, or unrelated widgets makes recovery harder.
- Relying on a redirect: A redirect can hide the fact that the requested URL is missing and send visitors somewhere irrelevant.
- Skipping a real-URL test: Previewing the template is not the same as requesting a URL that does not exist.
- Changing production PHP without safeguards: Keep a backup or version history and follow your normal deployment process.
When to revise the design
Review the 404 page whenever you change the site’s navigation, branding, search experience, or major content categories. A destination that was useful when the template was created may become obsolete. Re-test a nonexistent URL after theme changes, template updates, or plugin changes that affect routing or search.
Frequently Asked Questions
How do I know whether my WordPress theme is block-based or classic?
If your dashboard provides Appearance → Editor with editable templates, you are likely using a block theme. Classic themes generally rely on PHP files such as 404.php; confirm by checking the active theme’s documentation or files.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Can I edit a 404 page without coding?
Yes, when the active block theme exposes a 404 template in the Site Editor. A classic theme normally requires editing or creating 404.php through a theme-development workflow.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

