General

Fixing 404 Errors and Broken Links in WordPress

A 404 error means the requested URL could not be found. You may see it after moving a site, changing a URL, or removing content. It can also happen when WordPress cannot route a request to content that still exists.

This guide walks you through checking broken links, restoring existing pages, redirecting moved content, and making your 404 page more useful.

Check the affected URL

  1. Copy the full URL that shows the error. Check for spelling mistakes and compare it with the current link from the content editor.
  2. Confirm that the content exists and is published. A draft or private page may be unavailable to visitors who are not signed in.
  3. Check whether one URL, one type of content, or all pages are affected. Test the home page and a few other published pages.
  4. Note when the problem started and any recent migration, URL, plugin, or theme changes.

If a link on your site points to the wrong address, update that link. If content has moved permanently, add a redirect from its old address. If published content exists at the affected address, continue with the permalink checks below.

Resave your permalinks

Resaving permalinks refreshes the rules WordPress uses to match URLs to content. This can help after a migration or changes to a plugin or theme that provides custom content, such as courses or portfolio posts.

  1. In your WordPress admin area, go to Settings > Permalinks.
  2. Leave your current permalink structure and other fields unchanged.
  3. Scroll down and click Save Changes.
  4. Open the affected URL again and check whether the content loads.

Do not switch your permalink structure just to refresh these rules. Changing it can break existing links. For more details, see How to Regenerate Permalinks in WordPress.

Check routing for the affected content

If only courses, portfolio posts, or another custom content type returns 404 errors, confirm that the plugin or theme providing that content is active. Check its current permalink settings against the URL you are opening. A changed content base or nested URL setting can leave an older link pointing to an address that is no longer used.

If the problem started after a plugin or theme change, test that change on a staging copy before altering your live site. Keep the plugin or theme that registers the content type active while testing.

If many published URLs still return 404 errors, ask your hosting provider to check the server’s rewrite configuration. Apache and Nginx handle these rules differently, so editing an .htaccess file is not a fix for every server.

For product-specific checks, see LearnDash Permalinks (URLs) or Fixing HTTP 404 Errors in The Events Calendar.

Redirect content that has moved

Before replacing a site or changing its URL structure, list the old URLs and their matching destinations. Keep existing addresses where possible. For each permanent move, use a 301 redirect to the closest relevant replacement. If content has been removed with no suitable replacement, let its URL return a 404 or 410 response instead of sending every visitor to the home page.

You can manage redirects with your host’s tools or a WordPress redirect plugin. Use one place to manage each rule so that overlapping rules do not conflict.

  1. Enter the old address as the source and the replacement address as the target. Check the format required by your tool. Some expect a path such as /old-page/ rather than a full URL.
  2. Select a 301 response for a permanent move and save the rule.
  3. Visit the old URL and confirm that it reaches the correct replacement without a loop or unnecessary intermediate redirects.
  4. Update links on your site to point directly to the replacement URL.

Make your 404 page helpful

A custom 404 page helps visitors continue browsing when an address does not exist. Explain that the page could not be found, and offer a search box and links to useful sections of your site. Keep navigation and styling consistent with the rest of the site.

If you use a block theme, go to Appearance > Editor > Templates and open the 404 template. Edit its blocks, review the changes, and click Save. With a classic theme or a page builder, use its supported method for customizing the 404 layout. Creating a normal page named “404” does not automatically make it your site’s error template.

Test with an address that does not exist. Confirm that the helpful page appears and that the response still uses the HTTP 404 status. A missing page that returns a success response can be reported as a soft 404 by search engines. Changing the design does not repair broken links or replace redirects.

Monitor and report remaining errors

Use your site’s error logs, a broken-link checker, or Google Search Console to find affected URLs. Check where each link comes from before deciding whether to correct it, add a redirect, or leave an expected 404 in place. Not every request for a nonexistent address needs a redirect.

If you need help, contact your product’s support team for errors limited to its content, or your hosting provider for server routing issues. Explain whether the error affects one address, one content type, or all published pages. If URLs changed, include an old and current URL pair. Note whether resaving permalinks restored the page temporarily or had no effect, and whether the same address works while signed in but fails for visitors.

Filed under Troubleshooting
Last updated: October 30, 2026
Was this page helpful?
Thanks for the feedback!